diff options
author | dan <dan.abramov@gmail.com> | 2024-04-04 21:34:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-04 21:34:55 +0100 |
commit | 3915bb43169ae501d81571c5e1efa12cf0e24dbb (patch) | |
tree | be2f7bed7c842be71922f2793b4b4a20cd6fbc24 /src/screens/Onboarding/Layout.tsx | |
parent | c190fd58ec82b36ea8124902cad34acc4a5b5ac0 (diff) | |
download | voidsky-3915bb43169ae501d81571c5e1efa12cf0e24dbb.tar.zst |
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
Diffstat (limited to 'src/screens/Onboarding/Layout.tsx')
-rw-r--r-- | src/screens/Onboarding/Layout.tsx | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/screens/Onboarding/Layout.tsx b/src/screens/Onboarding/Layout.tsx index 6337cee09..cfaf20ffe 100644 --- a/src/screens/Onboarding/Layout.tsx +++ b/src/screens/Onboarding/Layout.tsx @@ -1,29 +1,27 @@ import React from 'react' import {View} from 'react-native' import {useSafeAreaInsets} from 'react-native-safe-area-context' -import {useLingui} from '@lingui/react' import {msg} from '@lingui/macro' +import {useLingui} from '@lingui/react' -import {IS_DEV} from '#/env' import {isWeb} from '#/platform/detection' import {useOnboardingDispatch} from '#/state/shell' - +import {ScrollView} from '#/view/com/util/Views' +import {Context} from '#/screens/Onboarding/state' import { - useTheme, atoms as a, - useBreakpoints, - web, - native, flatten, + native, TextStyleProp, + useBreakpoints, + useTheme, + web, } from '#/alf' -import {P, leading, Text} from '#/components/Typography' -import {ChevronLeft_Stroke2_Corner0_Rounded as ChevronLeft} from '#/components/icons/Chevron' import {Button, ButtonIcon} from '#/components/Button' -import {ScrollView} from '#/view/com/util/Views' +import {ChevronLeft_Stroke2_Corner0_Rounded as ChevronLeft} from '#/components/icons/Chevron' import {createPortalGroup} from '#/components/Portal' - -import {Context} from '#/screens/Onboarding/state' +import {leading, P, Text} from '#/components/Typography' +import {IS_DEV} from '#/env' const COL_WIDTH = 500 @@ -204,7 +202,7 @@ export function Layout({children}: React.PropsWithChildren<{}>) { ) } -export function Title({ +export function TitleText({ children, style, }: React.PropsWithChildren<TextStyleProp>) { @@ -224,7 +222,7 @@ export function Title({ ) } -export function Description({ +export function DescriptionText({ children, style, }: React.PropsWithChildren<TextStyleProp>) { |