foreground method

Color foreground({
  1. required BuildContext context,
  2. required bool isFocused,
  3. required bool isPressed,
  4. required bool isDisabled,
})

Implementation

Color foreground({
  required BuildContext context,
  required bool isFocused,
  required bool isPressed,
  required bool isDisabled,
}) {
  switch (this) {
    case OneButtonDestructiveHierarchy.primary:
      return OneColors.white;
    case OneButtonDestructiveHierarchy.secondary:
      return context.color.foreground(ForegroundColorType.brandPrimary);
    case OneButtonDestructiveHierarchy.tertiary:
      return context.color.foreground(ForegroundColorType.tertiary);
    case OneButtonDestructiveHierarchy.link:
      return context.color.foreground(ForegroundColorType.tertiaryHover);
  }
}