ALF content language dialog (#9471)
Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
@@ -14,7 +14,6 @@ import {EmptyState} from '#/view/com/util/EmptyState'
|
||||
import {ErrorMessage} from '#/view/com/util/error/ErrorMessage'
|
||||
import {ErrorScreen} from '#/view/com/util/error/ErrorScreen'
|
||||
import {Button} from '#/view/com/util/forms/Button'
|
||||
import {ToggleButton} from '#/view/com/util/forms/ToggleButton'
|
||||
import * as LoadingPlaceholder from '#/view/com/util/LoadingPlaceholder'
|
||||
import {Text} from '#/view/com/util/text/Text'
|
||||
import * as Toast from '#/view/com/util/Toast'
|
||||
@@ -47,10 +46,7 @@ export const DebugScreen = ({}: NativeStackScreenProps<
|
||||
)
|
||||
}
|
||||
|
||||
function DebugInner({
|
||||
colorScheme,
|
||||
onToggleColorScheme,
|
||||
}: {
|
||||
function DebugInner({}: {
|
||||
colorScheme: 'light' | 'dark'
|
||||
onToggleColorScheme: () => void
|
||||
}) {
|
||||
@@ -61,14 +57,6 @@ function DebugInner({
|
||||
const renderItem = (item: any) => {
|
||||
return (
|
||||
<View key={`view-${item.currentView}`}>
|
||||
<View style={[s.pt10, s.pl10, s.pr10]}>
|
||||
<ToggleButton
|
||||
type="default-light"
|
||||
onPress={onToggleColorScheme}
|
||||
isSelected={colorScheme === 'dark'}
|
||||
label={_(msg`Dark mode`)}
|
||||
/>
|
||||
</View>
|
||||
{item.currentView === 3 ? (
|
||||
<NotifsView />
|
||||
) : item.currentView === 2 ? (
|
||||
@@ -134,8 +122,6 @@ function ControlsView() {
|
||||
<ScrollView style={[s.pl10, s.pr10]}>
|
||||
<Heading label="Buttons" />
|
||||
<ButtonsView />
|
||||
<Heading label="Toggle Buttons" />
|
||||
<ToggleButtonsView />
|
||||
<View style={s.footerSpacer} />
|
||||
</ScrollView>
|
||||
)
|
||||
@@ -401,70 +387,3 @@ function ButtonsView() {
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
function ToggleButtonsView() {
|
||||
const defaultPal = usePalette('default')
|
||||
const buttonStyles = s.mb5
|
||||
const [isSelected, setIsSelected] = React.useState(false)
|
||||
const onToggle = () => setIsSelected(!isSelected)
|
||||
return (
|
||||
<View style={[defaultPal.view]}>
|
||||
<ToggleButton
|
||||
type="primary"
|
||||
label="Primary solid"
|
||||
style={buttonStyles}
|
||||
isSelected={isSelected}
|
||||
onPress={onToggle}
|
||||
/>
|
||||
<ToggleButton
|
||||
type="secondary"
|
||||
label="Secondary solid"
|
||||
style={buttonStyles}
|
||||
isSelected={isSelected}
|
||||
onPress={onToggle}
|
||||
/>
|
||||
<ToggleButton
|
||||
type="inverted"
|
||||
label="Inverted solid"
|
||||
style={buttonStyles}
|
||||
isSelected={isSelected}
|
||||
onPress={onToggle}
|
||||
/>
|
||||
<ToggleButton
|
||||
type="primary-outline"
|
||||
label="Primary outline"
|
||||
style={buttonStyles}
|
||||
isSelected={isSelected}
|
||||
onPress={onToggle}
|
||||
/>
|
||||
<ToggleButton
|
||||
type="secondary-outline"
|
||||
label="Secondary outline"
|
||||
style={buttonStyles}
|
||||
isSelected={isSelected}
|
||||
onPress={onToggle}
|
||||
/>
|
||||
<ToggleButton
|
||||
type="primary-light"
|
||||
label="Primary light"
|
||||
style={buttonStyles}
|
||||
isSelected={isSelected}
|
||||
onPress={onToggle}
|
||||
/>
|
||||
<ToggleButton
|
||||
type="secondary-light"
|
||||
label="Secondary light"
|
||||
style={buttonStyles}
|
||||
isSelected={isSelected}
|
||||
onPress={onToggle}
|
||||
/>
|
||||
<ToggleButton
|
||||
type="default-light"
|
||||
label="Default light"
|
||||
style={buttonStyles}
|
||||
isSelected={isSelected}
|
||||
onPress={onToggle}
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user