FFormFieldStyle.inherit constructor
FFormFieldStyle.inherit({
- required FColors colors,
- required FTypography typography,
Creates a FFormFieldStyle that inherits its properties.
Implementation
FFormFieldStyle.inherit({required FColors colors, required FTypography typography})
: labelTextStyle = FVariants.from(
typography.sm.copyWith(color: colors.foreground, fontWeight: .w600),
variants: {
[.error]: .delta(color: colors.error),
[.disabled]: .delta(color: colors.disable(colors.foreground)),
[.disabled.and(.error)]: .delta(color: colors.disable(colors.error)),
},
),
descriptionTextStyle = FVariants.from(
typography.sm.copyWith(color: colors.mutedForeground),
variants: {
[.disabled]: .delta(color: colors.disable(colors.mutedForeground)),
},
),
errorTextStyle = FVariants.from(
typography.sm.copyWith(color: colors.error, fontWeight: .w600),
variants: {
[.disabled]: .delta(color: colors.disable(colors.error)),
},
);