From c22e9009d778f5ca16eda7a3e6f0d22a6345f452 Mon Sep 17 00:00:00 2001 From: Jakz Date: Tue, 30 Apr 2024 13:14:39 +0800 Subject: [PATCH] Add text transform support to button --- apps/mobile/src/components/Button.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/mobile/src/components/Button.tsx b/apps/mobile/src/components/Button.tsx index 403137fdc..cdfb157ff 100644 --- a/apps/mobile/src/components/Button.tsx +++ b/apps/mobile/src/components/Button.tsx @@ -11,6 +11,7 @@ import { Typography } from './Typography'; type Variant = 'primary' | 'secondary' | 'danger' | 'disabled' | 'blue'; type FontWeight = 'Medium' | 'Regular' | 'Bold'; type Size = 'xs' | 'sm' | 'md'; +type TextTransform = 'uppercase' | 'capitalize' | 'lowercase'; export type ButtonProps = { style?: GalleryTouchableOpacityProps['style']; @@ -24,6 +25,7 @@ export type ButtonProps = { textClassName?: string; containerClassName?: string; fontWeight?: FontWeight; + textTransform?: TextTransform; size?: Size; DO_NOT_USE_OR_YOU_WILL_BE_FIRED_colorScheme?: 'light' | 'dark'; } & GalleryTouchableOpacityProps; @@ -179,6 +181,7 @@ export function Button({ size = 'md', fontWeight = 'Medium', footerElement, + textTransform = 'uppercase', DO_NOT_USE_OR_YOU_WILL_BE_FIRED_colorScheme, ...props }: ButtonProps) { @@ -226,9 +229,10 @@ export function Button({ {text}