Skip to content

Commit

Permalink
Merge branch 'master' into remove-snippet-focus
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan authored Jan 29, 2020
2 parents 2f6ce92 + d46f153 commit 8e0b9f3
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/components/docs/sass.md
Original file line number Diff line number Diff line change
Expand Up @@ -13165,6 +13165,8 @@ Button base styles
outline: none;
position: relative;
max-width: rem(320px);
// Fix to remove added margins on buttons in safari (see #5155)
margin: 0;

&:disabled,
&.#{$prefix}--btn--disabled {
Expand Down Expand Up @@ -15374,8 +15376,6 @@ Data table expandable styles
}

tr.#{$prefix}--parent-row.#{$prefix}--expandable-row + tr[data-child-row] td {
padding-bottom: rem(23px);
transition: padding $duration--moderate-01 motion(standard, productive);
border-bottom: 1px solid $ui-03;
}

Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/components/button/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
outline: none;
position: relative;
max-width: rem(320px);
// Fix to remove added margins on buttons in safari (see #5155)
margin: 0;

&:disabled,
&.#{$prefix}--btn--disabled {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@
}

tr.#{$prefix}--parent-row.#{$prefix}--expandable-row + tr[data-child-row] td {
padding-bottom: rem(23px);
transition: padding $duration--moderate-01 motion(standard, productive);
border-bottom: 1px solid $ui-03;
}

Expand Down
5 changes: 5 additions & 0 deletions packages/components/src/globals/scss/_css--reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@
box-sizing: border-box;
}

// Fix to remove added margins on buttons in safari (see #5155)
button {
margin: 0;
}

@include carbon--type-reset;
@include carbon--icons;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@import '~@carbon/type/scss/type';
@import '~@carbon/themes/scss/themes';

.demo-expanded-td td {
padding-left: 3.25rem !important;
padding-bottom: 1.5rem;
padding-top: 1rem;
}

.demo-inner-container-header {
@include carbon--type-style('productive-heading-01');
color: $text-01;
}

.demo-inner-container-content {
@include carbon--type-style('body-long-01');
color: $text-02;
}
14 changes: 11 additions & 3 deletions packages/react/src/components/DataTable/stories/with-expansion.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/

import './datatable-story.scss';

import React from 'react';
import DataTable, {
Table,
Expand Down Expand Up @@ -56,9 +58,15 @@ export default props => (
<TableCell key={cell.id}>{cell.value}</TableCell>
))}
</TableExpandRow>
<TableExpandedRow colSpan={headers.length + 1}>
<h1>Expandable row content</h1>
<p>Description here</p>
<TableExpandedRow
colSpan={headers.length + 1}
className="demo-expanded-td">
<h1 className="demo-inner-container-header">
Expandable row content
</h1>
<p className="demo-inner-container-content">
Description here
</p>
</TableExpandedRow>
</React.Fragment>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ export default class FilterableMultiSelect extends React.Component {
}
return {
inputValue: inputValue || '',
isOpen: Boolean(inputValue) || this.state.isOpen,
};
});
};
Expand Down

0 comments on commit 8e0b9f3

Please sign in to comment.