Skip to content

Commit

Permalink
feat(buttons): Switch usages of button classes in the docs to use the…
Browse files Browse the repository at this point in the history
… Button component
  • Loading branch information
ryanoglesby08 committed Oct 12, 2017
1 parent b191abd commit 73c8944
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
12 changes: 8 additions & 4 deletions src/old-components/ExpandCollapse/Panel.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,14 @@ const togglePanel = (panelKey) => {
};
<div>
<button className="button button--secondary button--link"
onClick={() => togglePanel('panel-1')}>Toggle panel #1</button>
<button className="button button--secondary button--link"
onClick={() => togglePanel('panel-2')}>Toggle panel #2</button>
<div style={{marginBottom: 10}}>
<Button variant="secondary" onClick={() => togglePanel('panel-1')}>
Toggle panel #1
</Button>
<Button variant="secondary" onClick={() => togglePanel('panel-2')}>
Toggle panel #2
</Button>
</div>
<Group activeKeys={state.activeKeys}>
<Panel header="Panel #1" panelKey="panel-1">
Expand Down
6 changes: 3 additions & 3 deletions src/old-components/SelectorCounter/CounterButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ const propTypes = {
label: PropTypes.string,
icon: PropTypes.string,
onClick: PropTypes.func,
disabled: PropTypes.bool
disabled: PropTypes.bool,
}

const defaultProps = {
label: 'Change value',
icon: 'caret-up',
onClick: () => {},
disabled: false
disabled: false,
}

const noop = () => {}
Expand All @@ -28,7 +28,7 @@ export default function counterButton(props) {
return (
<button
aria-label={label}
className="button--plain selector-counter__button"
className="selector-counter__plain-button selector-counter__button"
onClick={disabled ? noop : onClick}
disabled={disabled}
{...extraProps}
Expand Down
10 changes: 10 additions & 0 deletions src/old-components/SelectorCounter/SelectorCounter.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
width: rem(158px);
}

&__plain-button {
margin: 0;
padding: 0;
border: 0;
background-image: none;
background-color: transparent;
box-shadow: none;
text-align: center;
}

&__button {
position: absolute;
right: 15px;
Expand Down

0 comments on commit 73c8944

Please sign in to comment.