Skip to content

Commit

Permalink
Merge branch 'master' into code-snippet-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
vpicone authored Nov 16, 2019
2 parents 61aff34 + 77d8363 commit da0cea6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
3 changes: 2 additions & 1 deletion packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"lib",
"scss",
"svg",
"metadata.json"
"metadata.json",
"build-info.json"
],
"keywords": [
"ibm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,6 @@ exports[`DataTable selection -- radio buttons should render 1`] = `
value=""
/>
<label
aria-label="Select row"
className="bx--radio-button__label"
htmlFor="data-table-14__select-row-b"
>
Expand Down Expand Up @@ -655,7 +654,6 @@ exports[`DataTable selection -- radio buttons should render 1`] = `
value=""
/>
<label
aria-label="Select row"
className="bx--radio-button__label"
htmlFor="data-table-14__select-row-a"
>
Expand Down Expand Up @@ -742,7 +740,6 @@ exports[`DataTable selection -- radio buttons should render 1`] = `
value=""
/>
<label
aria-label="Select row"
className="bx--radio-button__label"
htmlFor="data-table-14__select-row-c"
>
Expand Down
5 changes: 1 addition & 4 deletions packages/react/src/components/RadioButton/RadioButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,7 @@ class RadioButton extends React.Component {
id={this.uid}
ref={ref}
/>
<label
htmlFor={this.uid}
className={`${prefix}--radio-button__label`}
aria-label={labelText}>
<label htmlFor={this.uid} className={`${prefix}--radio-button__label`}>
<span className={`${prefix}--radio-button__appearance`} />
<span className={innerLabelClasses}>{labelText}</span>
</label>
Expand Down
17 changes: 11 additions & 6 deletions packages/react/src/components/Tile/Tile.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ export class ExpandableTile extends Component {
static defaultProps = {
tabIndex: 0,
expanded: false,
tileMaxHeight: '0',
tileMaxHeight: 0,
tilePadding: 0,
onBeforeClick: () => true,
handleClick: () => {},
tileCollapsedIconText: 'Interact to expand Tile',
Expand Down Expand Up @@ -503,29 +504,31 @@ export class ExpandableTile extends Component {
const {
tabIndex,
className,
expanded, // eslint-disable-line
tileMaxHeight, // eslint-disable-line
tilePadding, // eslint-disable-line
handleClick, // eslint-disable-line
tileCollapsedIconText, // eslint-disable-line
tileExpandedIconText, // eslint-disable-line
onBeforeClick, // eslint-disable-line
light,
...other
} = this.props;

const { expanded } = this.state;
const { expanded: isExpanded } = this.state;

const classes = classNames(
`${prefix}--tile`,
`${prefix}--tile--expandable`,
{
[`${prefix}--tile--is-expanded`]: expanded,
[`${prefix}--tile--is-expanded`]: isExpanded,
[`${prefix}--tile--light`]: light,
},
className
);

const tileStyle = {
maxHeight: expanded
maxHeight: isExpanded
? null
: this.state.tileMaxHeight + this.state.tilePadding,
};
Expand Down Expand Up @@ -556,8 +559,10 @@ export class ExpandableTile extends Component {
{childrenAsArray[0]}
</div>
<button
aria-expanded={expanded}
aria-label={expanded ? tileExpandedIconText : tileCollapsedIconText}
aria-expanded={isExpanded}
aria-label={
isExpanded ? tileExpandedIconText : tileCollapsedIconText
}
className={`${prefix}--tile__chevron`}>
<ChevronDown16 />
</button>
Expand Down

0 comments on commit da0cea6

Please sign in to comment.