Migrate everything

This commit is contained in:
Eric Bailey
2024-02-12 17:45:07 -06:00
parent 65582457b7
commit 53da8d7714
3 changed files with 58 additions and 106 deletions
+2 -10
View File
@@ -144,6 +144,7 @@ export function useLink({
displayText,
closeModal,
openModal,
outerOnPress,
],
)
@@ -181,10 +182,7 @@ export function Link({children, to, action = 'push', ...rest}: LinkProps) {
<Button
label={href}
{...rest}
style={[
a.justify_start,
flatten(rest.style),
]}
style={[a.justify_start, flatten(rest.style)]}
role="link"
accessibilityRole="link"
href={href}
@@ -265,12 +263,6 @@ export function InlineLink({
target: isExternal ? 'blank' : undefined,
rel: isExternal ? 'noopener noreferrer' : undefined,
},
dataSet: stringChildren
? {}
: {
// default to no underline, apply this ourselves
noUnderline: '1',
},
})}>
{children}
</Text>
+17 -3
View File
@@ -2,7 +2,15 @@ import React from 'react'
import {Pressable, View, ViewStyle} from 'react-native'
import {HITSLOP_10} from 'lib/constants'
import {useTheme, atoms as a, web, native, flatten, ViewStyleProp} from '#/alf'
import {
useTheme,
atoms as a,
web,
native,
flatten,
ViewStyleProp,
TextStyleProp,
} from '#/alf'
import {Text} from '#/components/Typography'
import {useInteractionState} from '#/components/hooks/useInteractionState'
@@ -232,7 +240,10 @@ export function Item({
)
}
export function Label({children}: React.PropsWithChildren<{}>) {
export function Label({
children,
style,
}: React.PropsWithChildren<TextStyleProp>) {
const t = useTheme()
const {disabled} = useItemContext()
return (
@@ -241,11 +252,14 @@ export function Label({children}: React.PropsWithChildren<{}>) {
a.font_bold,
{
userSelect: 'none',
color: disabled ? t.palette.contrast_400 : t.palette.contrast_600,
color: disabled
? t.atoms.text_contrast_low.color
: t.atoms.text_contrast_high.color,
},
native({
paddingTop: 3,
}),
flatten(style),
]}>
{children}
</Text>