Enforce Text suffix for Text-rendering components (#3407)
* Rm unused * Add Text suffix to Title/Description * Add Text suffix to text components * Add Text suffix to props * Validate Text components returns
This commit is contained in:
parent
c190fd58ec
commit
3915bb4316
43 changed files with 453 additions and 366 deletions
|
@ -8,7 +8,7 @@ import * as TextField from '#/components/forms/TextField'
|
|||
import {DateFieldButton} from './index.shared'
|
||||
|
||||
export * as utils from '#/components/forms/DateField/utils'
|
||||
export const Label = TextField.Label
|
||||
export const LabelText = TextField.LabelText
|
||||
|
||||
export function DateField({
|
||||
value,
|
||||
|
|
|
@ -13,7 +13,7 @@ import * as TextField from '#/components/forms/TextField'
|
|||
import {DateFieldButton} from './index.shared'
|
||||
|
||||
export * as utils from '#/components/forms/DateField/utils'
|
||||
export const Label = TextField.Label
|
||||
export const LabelText = TextField.LabelText
|
||||
|
||||
/**
|
||||
* Date-only input. Accepts a date in the format YYYY-MM-DD, and reports date
|
||||
|
|
|
@ -9,7 +9,7 @@ import * as TextField from '#/components/forms/TextField'
|
|||
import {CalendarDays_Stroke2_Corner0_Rounded as CalendarDays} from '#/components/icons/CalendarDays'
|
||||
|
||||
export * as utils from '#/components/forms/DateField/utils'
|
||||
export const Label = TextField.Label
|
||||
export const LabelText = TextField.LabelText
|
||||
|
||||
const InputBase = React.forwardRef<HTMLInputElement, TextInputProps>(
|
||||
({style, ...props}, ref) => {
|
||||
|
|
|
@ -225,7 +225,7 @@ export function createInput(Component: typeof TextInput) {
|
|||
|
||||
export const Input = createInput(TextInput)
|
||||
|
||||
export function Label({
|
||||
export function LabelText({
|
||||
nativeID,
|
||||
children,
|
||||
}: React.PropsWithChildren<{nativeID?: string}>) {
|
||||
|
@ -288,7 +288,7 @@ export function Icon({icon: Comp}: {icon: React.ComponentType<SVGIconProps>}) {
|
|||
)
|
||||
}
|
||||
|
||||
export function Suffix({
|
||||
export function SuffixText({
|
||||
children,
|
||||
label,
|
||||
accessibilityHint,
|
||||
|
|
|
@ -3,16 +3,16 @@ import {Pressable, View, ViewStyle} from 'react-native'
|
|||
|
||||
import {HITSLOP_10} from 'lib/constants'
|
||||
import {
|
||||
useTheme,
|
||||
atoms as a,
|
||||
native,
|
||||
flatten,
|
||||
ViewStyleProp,
|
||||
native,
|
||||
TextStyleProp,
|
||||
useTheme,
|
||||
ViewStyleProp,
|
||||
} from '#/alf'
|
||||
import {Text} from '#/components/Typography'
|
||||
import {useInteractionState} from '#/components/hooks/useInteractionState'
|
||||
import {CheckThick_Stroke2_Corner0_Rounded as Checkmark} from '#/components/icons/Check'
|
||||
import {Text} from '#/components/Typography'
|
||||
|
||||
export type ItemState = {
|
||||
name: string
|
||||
|
@ -234,7 +234,7 @@ export function Item({
|
|||
)
|
||||
}
|
||||
|
||||
export function Label({
|
||||
export function LabelText({
|
||||
children,
|
||||
style,
|
||||
}: React.PropsWithChildren<TextStyleProp>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue