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/components/Prompt.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/components/Prompt.tsx')
-rw-r--r-- | src/components/Prompt.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/Prompt.tsx b/src/components/Prompt.tsx index 37d1b700a..000d2a3cd 100644 --- a/src/components/Prompt.tsx +++ b/src/components/Prompt.tsx @@ -51,7 +51,7 @@ export function Outer({ ) } -export function Title({children}: React.PropsWithChildren<{}>) { +export function TitleText({children}: React.PropsWithChildren<{}>) { const {titleId} = React.useContext(Context) return ( <Text nativeID={titleId} style={[a.text_2xl, a.font_bold, a.pb_sm]}> @@ -60,7 +60,7 @@ export function Title({children}: React.PropsWithChildren<{}>) { ) } -export function Description({children}: React.PropsWithChildren<{}>) { +export function DescriptionText({children}: React.PropsWithChildren<{}>) { const t = useTheme() const {descriptionId} = React.useContext(Context) return ( @@ -175,8 +175,8 @@ export function Basic({ }>) { return ( <Outer control={control} testID="confirmModal"> - <Title>{title}</Title> - <Description>{description}</Description> + <TitleText>{title}</TitleText> + <DescriptionText>{description}</DescriptionText> <Actions> <Action cta={confirmButtonCta} |