diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-10-17 18:48:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-17 18:48:38 +0300 |
commit | 74b0929e4d79690394c1217f63e458da5bf7317b (patch) | |
tree | 0f285273e4ede1a5d3a408abe5f60db40af53c80 /src/view/com/util/layouts/TitleColumnLayout.tsx | |
parent | 9a91746fbbd4d8e028195813bb0d47497a9cb4bf (diff) | |
download | voidsky-74b0929e4d79690394c1217f63e458da5bf7317b.tar.zst |
Logged out improvments (#5771)
* fetch all accounts in one go * delete unused component * add safeareaview to logged out layout * add safe area insets to LoggedOut view * add safe area insets to the error boundary * sanitize displaynames/handles * use button for X * increase spacing
Diffstat (limited to 'src/view/com/util/layouts/TitleColumnLayout.tsx')
-rw-r--r-- | src/view/com/util/layouts/TitleColumnLayout.tsx | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/src/view/com/util/layouts/TitleColumnLayout.tsx b/src/view/com/util/layouts/TitleColumnLayout.tsx deleted file mode 100644 index 49ad9fcdb..000000000 --- a/src/view/com/util/layouts/TitleColumnLayout.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import React from 'react' -import {StyleProp, StyleSheet, View, ViewStyle} from 'react-native' -import {usePalette} from 'lib/hooks/usePalette' -import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle' - -interface Props { - testID?: string - title: JSX.Element - horizontal: boolean - titleStyle?: StyleProp<ViewStyle> - contentStyle?: StyleProp<ViewStyle> -} - -export function TitleColumnLayout({ - testID, - title, - horizontal, - children, - titleStyle, - contentStyle, -}: React.PropsWithChildren<Props>) { - const pal = usePalette('default') - const titleBg = useColorSchemeStyle(pal.viewLight, pal.view) - const contentBg = useColorSchemeStyle(pal.view, { - backgroundColor: pal.colors.background, - borderColor: pal.colors.border, - borderLeftWidth: 1, - }) - - const layoutStyles = horizontal ? styles2Column : styles1Column - return ( - <View testID={testID} style={layoutStyles.container}> - <View style={[layoutStyles.title, titleBg, titleStyle]}>{title}</View> - <View style={[layoutStyles.content, contentBg, contentStyle]}> - {children} - </View> - </View> - ) -} - -const styles2Column = StyleSheet.create({ - container: { - flexDirection: 'row', - height: '100%', - }, - title: { - flex: 1, - paddingHorizontal: 40, - paddingBottom: 80, - justifyContent: 'center', - }, - content: { - flex: 2, - paddingHorizontal: 40, - justifyContent: 'center', - }, -}) - -const styles1Column = StyleSheet.create({ - container: {}, - title: { - paddingHorizontal: 40, - paddingVertical: 40, - }, - content: { - paddingHorizontal: 40, - paddingVertical: 40, - }, -}) |