Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Commit

Permalink
fix(Button): Update secondary button (#223)
Browse files Browse the repository at this point in the history
According to input from Theresa.
  • Loading branch information
willeeklund authored and bstream committed May 17, 2017
1 parent d86969a commit 2f410d8
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 9 deletions.
12 changes: 8 additions & 4 deletions src/components/button/button-styles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ export default createStyleSheet('Button', theme => {

secondary: {
background: 'none',
color: palette.background.secondary,
border: `2px solid ${palette.background.secondary}`,
color: palette.color.grayDark,
border: `2px solid ${palette.color.gray}`,

'&:hover': {
color: c(palette.background.secondary).darken(0.1).hex(),
borderColor: c(palette.background.secondary).darken(0.1).hex(),
color: c(palette.color.grayDark).darken(0.1).hex(),
borderColor: c(palette.color.gray).darken(0.1).hex(),
},

'&:disabled': {
Expand All @@ -177,6 +177,10 @@ export default createStyleSheet('Button', theme => {
},
},

'&.xs,&.sm': {
borderWidth: '1px',
},

'&.action': buttonModifierFn(
'secondary',
palette.variant.primary,
Expand Down
1 change: 1 addition & 0 deletions src/components/button/button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function Button({ variant, block, disabled, className, children, modifier, href,
danger: isDanger,
},
classes[size],
size,
className,
);

Expand Down
43 changes: 38 additions & 5 deletions src/components/button/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,46 @@ Secondary button:
const style = {
marginRight: 16,
};
const groupstyle = {
marginTop: 16,
};

<div>
<Button variant="secondary" style={ style }>Click Me</Button>
<Button variant="secondary" modifier="action" style={ style }>Click Me</Button>
<Button variant="secondary" modifier="danger" style={ style }>Click Me</Button>
<Button variant="secondary" modifier="warning" style={ style }>Click Me</Button>
<Button variant="secondary" modifier="success" style={ style }>Click Me</Button>
<div style={groupstyle}>
<div>size: xs</div>
<Button size="xs" variant="secondary" style={ style }>Click Me</Button>
<Button size="xs" variant="secondary" modifier="action" style={ style }>Click Me</Button>
<Button size="xs" variant="secondary" modifier="danger" style={ style }>Click Me</Button>
<Button size="xs" variant="secondary" modifier="warning" style={ style }>Click Me</Button>
<Button size="xs" variant="secondary" modifier="success" style={ style }>Click Me</Button>
</div>

<div style={groupstyle}>
<div>size: sm</div>
<Button size="sm" variant="secondary" style={ style }>Click Me</Button>
<Button size="sm" variant="secondary" modifier="action" style={ style }>Click Me</Button>
<Button size="sm" variant="secondary" modifier="danger" style={ style }>Click Me</Button>
<Button size="sm" variant="secondary" modifier="warning" style={ style }>Click Me</Button>
<Button size="sm" variant="secondary" modifier="success" style={ style }>Click Me</Button>
</div>

<div style={groupstyle}>
<div>size: md</div>
<Button size="md" variant="secondary" style={ style }>Click Me</Button>
<Button size="md" variant="secondary" modifier="action" style={ style }>Click Me</Button>
<Button size="md" variant="secondary" modifier="danger" style={ style }>Click Me</Button>
<Button size="md" variant="secondary" modifier="warning" style={ style }>Click Me</Button>
<Button size="md" variant="secondary" modifier="success" style={ style }>Click Me</Button>
</div>

<div style={groupstyle}>
<div>size: lg</div>
<Button size="lg" variant="secondary" style={ style }>Click Me</Button>
<Button size="lg" variant="secondary" modifier="action" style={ style }>Click Me</Button>
<Button size="lg" variant="secondary" modifier="danger" style={ style }>Click Me</Button>
<Button size="lg" variant="secondary" modifier="warning" style={ style }>Click Me</Button>
<Button size="lg" variant="secondary" modifier="success" style={ style }>Click Me</Button>
</div>
</div>

Secondary, disabled:
Expand Down

0 comments on commit 2f410d8

Please sign in to comment.