Skip to content

Commit

Permalink
Fix Button group border radius and focus
Browse files Browse the repository at this point in the history
  • Loading branch information
jonambas committed Sep 25, 2017
1 parent a9550d4 commit 60c7959
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/Button/Button.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

.Button,
.Button:visited {
display: inline-block;
padding: rem(5) rem(12);
border: none;
margin-bottom: 0;
Expand Down Expand Up @@ -29,11 +30,13 @@
border-radius: 0;

&:first-child {
border-radius: border-radius() 0 0 border-radius();
border-top-left-radius: border-radius();
border-bottom-left-radius: border-radius();
}

&:last-child {
border-radius: 0 border-radius() border-radius() 0;
border-top-right-radius: border-radius();
border-bottom-right-radius: border-radius();
}
}

Expand All @@ -54,6 +57,8 @@
}

&:focus {
position: relative;
z-index: 1;
outline: 0;
border: 1px solid color(blue);
box-shadow: 0 0 0 1px color(blue);
Expand Down
2 changes: 2 additions & 0 deletions src/components/Button/Group.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ Group.propTypes = {
]).isRequired
};

Group.displayName = 'Button.Group';

export default Group;
8 changes: 8 additions & 0 deletions stories/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,12 @@ export default storiesOf('Button', module)

.addWithInfo('External', () => (
<Button to='http://google.com'>Google</Button>
))

.addWithInfo('Group', () => (
<Button.Group>
<Button>Linear</Button>
<Button>Log</Button>
<Button disabled>Sq Rt</Button>
</Button.Group>
));

0 comments on commit 60c7959

Please sign in to comment.