foreground method
Color
foreground({
- required BuildContext context,
- required bool isFocused,
- required bool isPressed,
- 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);
}
}