Add some form elements

This commit is contained in:
Eric Bailey
2024-01-09 17:37:43 -06:00
parent b5474eb61e
commit 83876b62e1
6 changed files with 189 additions and 11 deletions
+5 -2
View File
@@ -7,7 +7,7 @@ import {
ViewStyle,
} from 'react-native'
import {atoms, tokens, web, native} from '#/alf'
import {useTheme, atoms, tokens, web, native} from '#/alf'
export type ButtonType = 'primary' | 'secondary' | 'negative'
export type ButtonSize = 'small' | 'large'
@@ -217,6 +217,8 @@ export function ButtonText({
disabled,
...rest
}: ButtonTextProps) {
const t = useTheme()
const textStyles = React.useMemo(() => {
const baseStyles = []
@@ -244,6 +246,7 @@ export function ButtonText({
break
}
default:
baseStyles.push(t.atoms.text)
}
switch (size) {
@@ -267,7 +270,7 @@ export function ButtonText({
}
return baseStyles
}, [type, size, disabled])
}, [t, type, size, disabled])
return (
<Text