diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-01-26 23:04:38 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2023-01-26 23:04:38 -0600 |
commit | e6b63e3f53061a207587cfbd98095386a8e90167 (patch) | |
tree | 043c91e4d0631a89239756ba924d468809375360 /src/view/com/posts/ComposerPrompt.tsx | |
parent | cd96c94d3a75058780b9722255e8da0579e12b4e (diff) | |
download | voidsky-e6b63e3f53061a207587cfbd98095386a8e90167.tar.zst |
Update compose prompts for web
Diffstat (limited to 'src/view/com/posts/ComposerPrompt.tsx')
-rw-r--r-- | src/view/com/posts/ComposerPrompt.tsx | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/view/com/posts/ComposerPrompt.tsx b/src/view/com/posts/ComposerPrompt.tsx new file mode 100644 index 000000000..1ddc28756 --- /dev/null +++ b/src/view/com/posts/ComposerPrompt.tsx @@ -0,0 +1,47 @@ +import React from 'react' +import {StyleSheet, TouchableOpacity, View} from 'react-native' +import {Text} from '../util/text/Text' +import {usePalette} from '../../lib/hooks/usePalette' + +export function ComposerPrompt({ + onPressCompose, +}: { + onPressCompose: (imagesOpen?: boolean) => void +}) { + const pal = usePalette('default') + return ( + <View style={[pal.view, pal.border, styles.container]}> + <TouchableOpacity + testID="composePromptButton" + onPress={() => onPressCompose(false)} + style={[styles.btn, {backgroundColor: pal.colors.backgroundLight}]}> + <Text type="button" style={pal.text}> + New post + </Text> + </TouchableOpacity> + <TouchableOpacity + onPress={() => onPressCompose(true)} + style={[styles.btn, {backgroundColor: pal.colors.backgroundLight}]}> + <Text type="button" style={pal.text}> + Share photo + </Text> + </TouchableOpacity> + </View> + ) +} + +const styles = StyleSheet.create({ + container: { + paddingVertical: 12, + paddingHorizontal: 16, + flexDirection: 'row', + alignItems: 'center', + borderTopWidth: 1, + }, + btn: { + paddingVertical: 6, + paddingHorizontal: 14, + borderRadius: 30, + marginRight: 10, + }, +}) |