|
| 1 | +@use 'sass:list'; |
| 2 | +@import '../../../themes/oneui/constants/colors'; |
| 3 | + |
| 4 | +$contexts: list.join($contexts, ('info', 'neutral')); |
| 5 | +$variants: (subtle, bold); |
| 6 | + |
| 7 | +.StatusBadge { |
| 8 | + display: flex; |
| 9 | + align-items: center; |
| 10 | + border-radius: var(--border-radius); |
| 11 | + padding: var(--space-0) var(--space-75); |
| 12 | + height: var(--space-250); |
| 13 | + width: fit-content; |
| 14 | + max-width: 200px; |
| 15 | + min-width: var(--space-250); |
| 16 | + composes: OneUI-caption-text from global; |
| 17 | + |
| 18 | + &__text { |
| 19 | + overflow: hidden; |
| 20 | + text-overflow: ellipsis; |
| 21 | + white-space: nowrap; |
| 22 | + } |
| 23 | + |
| 24 | + &__icon { |
| 25 | + height: var(--space-150); |
| 26 | + width: var(--space-150); |
| 27 | + padding-right: var(--space-50); |
| 28 | + } |
| 29 | + |
| 30 | + @each $context in $contexts { |
| 31 | + @each $variant in $variants { |
| 32 | + &--context_#{$context}.StatusBadge--variant_#{$variant} { |
| 33 | + @if $variant == bold { |
| 34 | + background-color: var(--color-background-#{$context}-bold-default); |
| 35 | + color: var(--color-text-inverse); |
| 36 | + @if $context == cautious { |
| 37 | + color: var(--color-text-cautious-inverse-default, #1a1a1a); |
| 38 | + } |
| 39 | + } @else { |
| 40 | + background: var(--color-background-#{$context}-subtlest-default); |
| 41 | + color: var(--color-text-#{$context}-default); |
| 42 | + @if $context == neutral { |
| 43 | + background: var(--color-background-neutral-subtle-default, #e6e6e6); |
| 44 | + color: var(--color-text-subtle); |
| 45 | + } |
| 46 | + } |
| 47 | + } |
| 48 | + } |
| 49 | + } |
| 50 | +} |
0 commit comments