Skip to content

Commit

Permalink
feat(switch): improved theming
Browse files Browse the repository at this point in the history
  • Loading branch information
SiebenSieben committed Nov 19, 2020
1 parent 3dcb532 commit b4ecc39
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion packages/switch/src/Component.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import { Switch } from './Component';
import { name, version } from '../package.json';


<Meta title='Компоненты' component={Switch} />
<Meta
title='Компоненты'
component={Switch}
parameters={{ 'theme-switcher': { themes: ['click'] } }}
/>


<!-- Canvas -->
Expand Down
8 changes: 4 additions & 4 deletions packages/switch/src/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
--switch-checked-border-color: var(--color-light-graphic-negative);
--switch-disabled-bg-color: var(--color-light-graphic-neutral);
--switch-disabled-border-color: var(--color-light-graphic-neutral);
--switch-disabled-checked-bg-color: var(--color-red-brand-30-flat); /* TODO */
--switch-disabled-checked-border-color: var(--color-red-brand-30-flat); /* TODO */
--switch-checked-disabled-bg-color: var(--color-red-brand-30-flat); /* TODO */
--switch-checked-disabled-border-color: var(--color-red-brand-30-flat); /* TODO */
}

.component {
Expand Down Expand Up @@ -115,8 +115,8 @@
}

.disabled.checked .switch {
background-color: var(--switch-disabled-checked-bg-color);
border-color: var(--switch-disabled-checked-border-color);
background-color: var(--switch-checked-disabled-bg-color);
border-color: var(--switch-checked-disabled-border-color);
}

/* Focused state */
Expand Down

0 comments on commit b4ecc39

Please sign in to comment.