From 9691ccf48f64dd0fac669ae51943907cc8da9b78 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 6 Feb 2022 20:23:11 +0100 Subject: Added status indicator and avatar --- src/objects/_status-indicator.scss | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/objects/_status-indicator.scss (limited to 'src/objects/_status-indicator.scss') diff --git a/src/objects/_status-indicator.scss b/src/objects/_status-indicator.scss new file mode 100644 index 0000000..18d6f81 --- /dev/null +++ b/src/objects/_status-indicator.scss @@ -0,0 +1,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}); + } + } + } +} -- cgit v1.2.3-54-g00ecf