HubbleButtonStyle.ghost constructor

HubbleButtonStyle.ghost({
  1. required HubbleColorPalette colors,
  2. required HubbleTypography typography,
})

Implementation

factory HubbleButtonStyle.ghost({
  required HubbleColorPalette colors,
  required HubbleTypography typography,
}) {
  return HubbleButtonStyle(
      foregroundColor:
          const HubbleButtonStateVariant.all(Colors.transparent).copyWith(
        enabled: Colors.black.withOpacity(0.2),
      ),
      color: const HubbleButtonStateVariant.all(Colors.transparent),
      radius: BorderRadius.circular(100),
      textStyle: HubbleButtonStateVariant(
        enabled: typography.s15.copyWith(
          color: colors.base.primary.dark,
          fontWeight: FontWeight.w600,
        ),
        caution: typography.s15.copyWith(
          color: colors.system.error.dark,
          fontWeight: FontWeight.w600,
        ),
        pressed: typography.s15.copyWith(
          color: colors.brand.secondary.dark,
          fontWeight: FontWeight.w600,
        ),
        progress: typography.s15.copyWith(
          color: colors.base.primary.medium,
          fontWeight: FontWeight.w600,
        ),
        disabled: typography.s15.copyWith(
          color: colors.disabled,
          fontWeight: FontWeight.w600,
        ),
        success: typography.s15.copyWith(
          color: colors.system.success.dark,
          fontWeight: FontWeight.w600,
        ),
        grey: typography.s15.copyWith(
          color: colors.textColorDark,
          fontWeight: FontWeight.w600,
        ),
      ),
      padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 8),
      height: 48,
      border: const HubbleButtonStateVariant<Border?>.all(null));
}