summaryrefslogtreecommitdiffstats
path: root/src/objects/_status-indicator.scss
blob: 4c5305eaf33ab67e2769fed04f83cc5564946b56 (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/index' 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}-static --800),
            ),
        ));
    }

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

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