Skip to content

Commit

Permalink
fix: button styles (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
eltongarbin committed Oct 1, 2020
1 parent 3b267e9 commit ec0f7b6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 28 deletions.
10 changes: 9 additions & 1 deletion packages/ocean-components/src/Button/stories/Button.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ If that's not sufficient, you can check the [implementation of the component](ht
<Canvas>
<Story
name="Playground"
args={{ children: 'My Button', blocked: false }}
args={{
children: 'My Button',
blocked: false,
disabled: false,
}}
argTypes={{
children: {
name: 'children',
Expand All @@ -142,6 +146,10 @@ If that's not sufficient, you can check the [implementation of the component](ht
name: 'blocked',
control: 'boolean',
},
disabled: {
name: 'disabled',
control: 'boolean',
},
}}
>
{(props) => <Button {...props} />}
Expand Down
40 changes: 13 additions & 27 deletions packages/ocean-components/src/Button/styles/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
padding-right: $spacing-inline-md;
}

&:disabled {
cursor: not-allowed;
color: $color-interface-dark-up;
background-color: $color-interface-light-down;
}

&--primary {
background-color: $color-brand-primary-pure;
color: $color-interface-light-pure;
Expand All @@ -42,17 +48,12 @@
background-color: $color-brand-primary-down;
}

&:active {
background-color: $color-brand-primary-deep;
}

&:focus {
background-color: $color-brand-primary-down;
}

&:disabled {
background-color: $color-interface-dark-up;
background-color: $color-interface-light-down;
&:active {
background-color: $color-brand-primary-deep;
}
}

Expand All @@ -64,17 +65,12 @@
background-color: $color-interface-light-down;
}

&:active {
background-color: $color-interface-dark-up;
}

&:focus {
background-color: $color-interface-light-down;
}

&:disabled {
&:active {
background-color: $color-interface-dark-up;
background-color: $color-interface-light-down;
}
}

Expand All @@ -86,17 +82,12 @@
background-color: $color-interface-light-down;
}

&:active {
background-color: $color-interface-light-deep;
}

&:focus {
background-color: $color-interface-light-down;
}

&:disabled {
background-color: $color-interface-dark-up;
background-color: $color-interface-light-down;
&:active {
background-color: $color-interface-light-deep;
}
}

Expand All @@ -108,17 +99,12 @@
background-color: $color-complementary-down;
}

&:active {
background-color: $color-complementary-deep;
}

&:focus {
background-color: $color-complementary-down;
}

&:disabled {
background-color: $color-interface-dark-up;
background-color: $color-interface-light-down;
&:active {
background-color: $color-complementary-deep;
}
}

Expand Down

0 comments on commit ec0f7b6

Please sign in to comment.