about summary refs log tree commit diff
path: root/src/screens/Onboarding/StepModeration/ModerationOption.tsx
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-04-05 14:57:53 +0100
committerGitHub <noreply@github.com>2024-04-05 14:57:53 +0100
commit49266c355ea781cbd7a0b373e64143da7740c91e (patch)
tree5f0a39882c30d2b8a8c5d8f952923c4a6fc3c607 /src/screens/Onboarding/StepModeration/ModerationOption.tsx
parent9b087b721dee0a6a33bb85ac5098989ab965d658 (diff)
downloadvoidsky-49266c355ea781cbd7a0b373e64143da7740c91e.tar.zst
Remove special cases for some buttons with text (#3412)
* Toggle.Button -> Toggle.ButtonWithText

* Simplify Prompt.Cancel/Action

* Move lines down for better diff

* Remove ButtonWithText

* Simplify types
Diffstat (limited to 'src/screens/Onboarding/StepModeration/ModerationOption.tsx')
-rw-r--r--src/screens/Onboarding/StepModeration/ModerationOption.tsx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/screens/Onboarding/StepModeration/ModerationOption.tsx b/src/screens/Onboarding/StepModeration/ModerationOption.tsx
index ac02a874c..d6334e6bd 100644
--- a/src/screens/Onboarding/StepModeration/ModerationOption.tsx
+++ b/src/screens/Onboarding/StepModeration/ModerationOption.tsx
@@ -1,17 +1,17 @@
 import React from 'react'
 import {View} from 'react-native'
-import {LabelPreference, InterpretedLabelValueDefinition} from '@atproto/api'
-import {useLingui} from '@lingui/react'
+import {InterpretedLabelValueDefinition, LabelPreference} from '@atproto/api'
 import {msg, Trans} from '@lingui/macro'
+import {useLingui} from '@lingui/react'
 
+import {useGlobalLabelStrings} from '#/lib/moderation/useGlobalLabelStrings'
 import {
   usePreferencesQuery,
   usePreferencesSetContentLabelMutation,
 } from '#/state/queries/preferences'
 import {atoms as a, useTheme} from '#/alf'
-import {Text} from '#/components/Typography'
 import * as ToggleButton from '#/components/forms/ToggleButton'
-import {useGlobalLabelStrings} from '#/lib/moderation/useGlobalLabelStrings'
+import {Text} from '#/components/Typography'
 
 export function ModerationOption({
   labelValueDefinition,
@@ -83,13 +83,13 @@ export function ModerationOption({
             values={[visibility ?? 'hide']}
             onChange={onChange}>
             <ToggleButton.Button name="ignore" label={labels.show}>
-              {labels.show}
+              <ToggleButton.ButtonText>{labels.show}</ToggleButton.ButtonText>
             </ToggleButton.Button>
             <ToggleButton.Button name="warn" label={labels.warn}>
-              {labels.warn}
+              <ToggleButton.ButtonText>{labels.warn}</ToggleButton.ButtonText>
             </ToggleButton.Button>
             <ToggleButton.Button name="hide" label={labels.hide}>
-              {labels.hide}
+              <ToggleButton.ButtonText>{labels.hide}</ToggleButton.ButtonText>
             </ToggleButton.Button>
           </ToggleButton.Group>
         )}