Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.

Commit

Permalink
fix(Button): Add missing colour styles to white button option (#626)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Gillard authored May 23, 2019
1 parent ef877cd commit 4c11882
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions react/Button/Button.less
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@
.buttonColor(@sk-black, @sk-mid-gray-light);
}

.root_isWhite {
.buttonColor(@sk-black, @sk-white);
}

.root_isGhost,
.root_isTransparent {
background-color: transparent;
Expand Down
5 changes: 5 additions & 0 deletions react/Button/Button.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ describe('Button:', () => {
expect(wrapper).toMatchSnapshot();
});

it('should render white button', () => {
const wrapper = shallow(<Button color="white">SEEK</Button>);
expect(wrapper).toMatchSnapshot();
});

it('should render transparent button', () => {
const wrapper = shallow(<Button color="transparent">SEEK</Button>);
expect(wrapper).toMatchSnapshot();
Expand Down
9 changes: 9 additions & 0 deletions react/Button/__snapshots__/Button.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ exports[`Button: color variants: should render transparent button 1`] = `
</button>
`;

exports[`Button: color variants: should render white button 1`] = `
<button
className="Button__root Button__root_isWhite"
disabled={false}
>
SEEK
</button>
`;

exports[`Button: color variants: should render white ghost button 1`] = `
<button
className="Button__root Button__root_isGhost Button__root_isWhite"
Expand Down

0 comments on commit 4c11882

Please sign in to comment.