diff options
author | dan <dan.abramov@gmail.com> | 2024-04-05 15:09:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-05 15:09:35 +0100 |
commit | 46c112edfdcb40681a8997ec4f47b413a08fdd14 (patch) | |
tree | 8745de3a743f9231a5151296c2df4fd6e39404e7 /src/view/screens/Storybook/Dialogs.tsx | |
parent | 49266c355ea781cbd7a0b373e64143da7740c91e (diff) | |
download | voidsky-46c112edfdcb40681a8997ec4f47b413a08fdd14.tar.zst |
Enforce that text is wrapped in <Text>, remaining cases (#3421)
* Toggle.Button -> Toggle.ButtonWithText * Simplify Prompt.Cancel/Action * Move lines down for better diff * Remove ButtonWithText * Simplify types * Enforce Button/ButtonText nesting * Add suggested wrapper in linter error * Check <Trans> ancestry too * Also check literals * Rm ts-ignore
Diffstat (limited to 'src/view/screens/Storybook/Dialogs.tsx')
-rw-r--r-- | src/view/screens/Storybook/Dialogs.tsx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/view/screens/Storybook/Dialogs.tsx b/src/view/screens/Storybook/Dialogs.tsx index 5c5e480fe..4722784ca 100644 --- a/src/view/screens/Storybook/Dialogs.tsx +++ b/src/view/screens/Storybook/Dialogs.tsx @@ -3,7 +3,7 @@ import {View} from 'react-native' import {useDialogStateControlContext} from '#/state/dialogs' import {atoms as a} from '#/alf' -import {Button} from '#/components/Button' +import {Button, ButtonText} from '#/components/Button' import * as Dialog from '#/components/Dialog' import * as Prompt from '#/components/Prompt' import {H3, P} from '#/components/Typography' @@ -26,7 +26,7 @@ export function Dialogs() { basic.open() }} label="Open basic dialog"> - Open all dialogs + <ButtonText>Open all dialogs</ButtonText> </Button> <Button @@ -37,7 +37,7 @@ export function Dialogs() { scrollable.open() }} label="Open basic dialog"> - Open scrollable dialog + <ButtonText>Open scrollable dialog</ButtonText> </Button> <Button @@ -48,7 +48,7 @@ export function Dialogs() { basic.open() }} label="Open basic dialog"> - Open basic dialog + <ButtonText>Open basic dialog</ButtonText> </Button> <Button @@ -57,7 +57,7 @@ export function Dialogs() { size="small" onPress={() => prompt.open()} label="Open prompt"> - Open prompt + <ButtonText>Open prompt</ButtonText> </Button> <Prompt.Outer control={prompt}> @@ -102,7 +102,7 @@ export function Dialogs() { size="small" onPress={closeAllDialogs} label="Close all dialogs"> - Close all dialogs + <ButtonText>Close all dialogs</ButtonText> </Button> <View style={{height: 1000}} /> <View style={[a.flex_row, a.justify_end]}> @@ -116,7 +116,7 @@ export function Dialogs() { }) } label="Open basic dialog"> - Close dialog + <ButtonText>Close dialog</ButtonText> </Button> </View> </View> |