madetech/solidus_wms

View on GitHub
app/assets/stylesheets/spree/backend/solidus_wms/components/_states.scss

Summary

Maintainability
Test Coverage
@import 'spree/backend/globals/deprecation';
@import 'spree/backend/globals/functions';
@import 'spree/backend/globals/variables_override';
@import 'spree/backend/globals/variables';

$color-ste-picked-bg: $color-notice !default;
$color-ste-picked-text: $color-1 !default;

$color-ste-received-bg: $color-notice !default;
$color-ste-received-text: $color-1 !default;

$color-ste-delivered-bg: $color-success !default;
$color-ste-delivered-text: $color-1 !default;

$additional-states: picked, received, delivered !default;
$additional-states-bg-colors: $color-ste-picked-bg, $color-ste-received-bg, $color-ste-delivered-bg !default;
$additional-states-text-colors: $color-ste-picked-text, $color-ste-received-text, $color-ste-delivered-text !default;


.state {
  @each $additional-state in $additional-states {
    &.#{$additional-state}:before {
      background-color: get-value($additional-states, $additional-states-bg-colors, $additional-state);
    }
  }
}