Skip to content

Commit

Permalink
Merge 514b862 into 87df4c8
Browse files Browse the repository at this point in the history
  • Loading branch information
jbadan committed Jan 16, 2019
2 parents 87df4c8 + 514b862 commit 036cb27
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ Button.propTypes = {
onClick: PropTypes.func
};

export const ButtonGroup = props => {
const { children } = props;
export const ButtonGroup = ({children, ...props}) => {
return (
<div aria-label='Group label' className='fd-button-group'
<div
{...props}
aria-label='Group label'
className='fd-button-group'
role='group'>
{children}
</div>
Expand Down
8 changes: 6 additions & 2 deletions src/Button/Button.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,12 @@ describe('<Button />', () => {
).toBe('Sample');
});

xtest('should allow props to be spread to the ButtonGroup component', () => {
// TODO: placeholder for this test description once that functionality is built
test('should allow props to be spread to the ButtonGroup component', () => {
const element = mount(<ButtonGroup data-sample='Sample' />);

expect(
element.getDOMNode().attributes['data-sample'].value
).toBe('Sample');
});
});
});

0 comments on commit 036cb27

Please sign in to comment.