Skip to content

Commit

Permalink
Add text transform support to button
Browse files Browse the repository at this point in the history
  • Loading branch information
jakzaizzat committed Apr 30, 2024
1 parent 1f69a5b commit c22e900
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/mobile/src/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand All @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -226,9 +229,10 @@ export function Button({
<Typography
font={{ family: 'ABCDiatype', weight: fontWeight }}
className={clsx(
'text-xs uppercase text-center',
'text-xs text-center',
variantClassNames.textClassName,
textClassName
textClassName,
textTransform
)}
>
{text}
Expand Down

0 comments on commit c22e900

Please sign in to comment.