diff options
Diffstat (limited to 'src/objects/_status-indicator.scss')
| -rw-r--r-- | src/objects/_status-indicator.scss | 42 |
1 files changed, 15 insertions, 27 deletions
diff --git a/src/objects/_status-indicator.scss b/src/objects/_status-indicator.scss index ce1794a..2555894 100644 --- a/src/objects/_status-indicator.scss +++ b/src/objects/_status-indicator.scss | |||
| @@ -1,38 +1,26 @@ | |||
| 1 | @use 'sass:map'; | ||
| 2 | @use 'sass:meta'; | ||
| 3 | @use 'sass:string'; | ||
| 1 | @use 'iro-sass/src/iro-sass' as iro; | 4 | @use 'iro-sass/src/iro-sass' as iro; |
| 2 | @use '../functions' as fn; | 5 | @use '../props'; |
| 3 | 6 | ||
| 4 | $themes: 'accent' 'positive' 'negative' 'warning' !default; | 7 | @forward 'status-indicator.vars'; |
| 8 | @use 'status-indicator.vars' as vars; | ||
| 5 | 9 | ||
| 6 | @include iro.props-namespace('status-indicator') { | 10 | @mixin styles { |
| 7 | @include iro.props-store(( | 11 | @include props.materialize(meta.module-variables('vars')); |
| 8 | --dims: ( | ||
| 9 | --size: fn.global-dim(--size --125), | ||
| 10 | ), | ||
| 11 | --colors: ( | ||
| 12 | --default: fn.global-color(--border-strong), | ||
| 13 | --primary: fn.global-color(--text), | ||
| 14 | ), | ||
| 15 | )); | ||
| 16 | 12 | ||
| 17 | @each $theme in $themes { | 13 | @include iro.bem-object('status-indicator') { |
| 18 | @include iro.props-store(( | ||
| 19 | --colors: ( | ||
| 20 | --#{$theme}: fn.global-color(--#{$theme} --700), | ||
| 21 | ), | ||
| 22 | )); | ||
| 23 | } | ||
| 24 | |||
| 25 | @include iro.bem-object(iro.props-namespace()) { | ||
| 26 | display: inline-block; | 14 | display: inline-block; |
| 27 | inline-size: fn.dim(--size); | 15 | inline-size: props.get(vars.$size); |
| 28 | block-size: fn.dim(--size); | 16 | block-size: props.get(vars.$size); |
| 29 | vertical-align: middle; | 17 | vertical-align: middle; |
| 30 | background-color: fn.color(--default); | 18 | background-color: props.get(vars.$default); |
| 31 | border-radius: 10em; | 19 | border-radius: 10em; |
| 32 | 20 | ||
| 33 | @each $theme in $themes { | 21 | @each $theme in map.keys(props.get(vars.$themes)) { |
| 34 | @include iro.bem-is($theme) { | 22 | @include iro.bem-is(string.slice($theme, 3)) { |
| 35 | background-color: fn.color(--#{$theme}); | 23 | background-color: props.get(vars.$themes, $theme); |
| 36 | } | 24 | } |
| 37 | } | 25 | } |
| 38 | } | 26 | } |
