summaryrefslogtreecommitdiffstats
path: root/src/objects/_status-indicator.scss
blob: ce1794a6f305f09ed41a879381a52b2b521152a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@use 'iro-sass/src/iro-sass' as iro;
@use '../functions' as fn;

$themes: 'accent' 'positive' 'negative' 'warning' !default;

@include iro.props-namespace('status-indicator') {
    @include iro.props-store((
        --dims: (
            --size: fn.global-dim(--size --125),
        ),
        --colors: (
            --default: fn.global-color(--border-strong),
            --primary: fn.global-color(--text),
        ),
    ));

    @each $theme in $themes {
        @include iro.props-store((
            --colors: (
                --#{$theme}: fn.global-color(--#{$theme} --700),
            ),
        ));
    }

    @include iro.bem-object(iro.props-namespace()) {
        display:          inline-block;
        inline-size:      fn.dim(--size);
        block-size:       fn.dim(--size);
        vertical-align:   middle;
        background-color: fn.color(--default);
        border-radius:    10em;

        @each $theme in $themes {
            @include iro.bem-is($theme) {
                background-color: fn.color(--#{$theme});
            }
        }
    }
}