summaryrefslogtreecommitdiffstats
path: root/src/objects/_status-indicator.scss
blob: 18d6f81fe8c3e3559674f6e73b2762be32c70229 (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
@use 'iro-sass/src/index' as iro;
@use '../functions' as fn;

@include iro.props-namespace('status-indicator') {
    @include iro.props-store((
        --dims: (
            --size: iro.fn-px-to-rem(10px),
        ),
    ), 'dims');

    @include iro.props-store((
        --colors: (
            --default: fn.global-color(--obj-lo),
            --green:  scale-color(hsl(113, 49.8%, 49.6%), $lightness: 15%),
            --yellow: scale-color(hsl(50, 59.8%, 58.4%), $lightness: 15%),
            --red:    scale-color(hsl(352, 69.8%, 58.4%), $lightness: 15%),
        ),
    ), 'colors');

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

        @each $color in 'green' 'yellow' 'red' {
            @include iro.bem-is($color) {
                background-color: fn.color(--#{$color});
            }
        }
    }
}