diff options
Diffstat (limited to 'src/view/com/util/PostSandboxWarning.tsx')
-rw-r--r-- | src/view/com/util/PostSandboxWarning.tsx | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/view/com/util/PostSandboxWarning.tsx b/src/view/com/util/PostSandboxWarning.tsx new file mode 100644 index 000000000..54495aa9b --- /dev/null +++ b/src/view/com/util/PostSandboxWarning.tsx @@ -0,0 +1,32 @@ +import React from 'react' +import {StyleSheet, View} from 'react-native' +import {Text} from './text/Text' +import {useStores} from 'state/index' +import {usePalette} from 'lib/hooks/usePalette' + +export function PostSandboxWarning() { + const store = useStores() + const pal = usePalette('default') + if (store.session.isSandbox) { + return ( + <View style={styles.container}> + <Text type="title-2xl" style={[pal.text, styles.text]}> + SANDBOX + </Text> + </View> + ) + } + return null +} + +const styles = StyleSheet.create({ + container: { + position: 'absolute', + top: 6, + right: 10, + }, + text: { + fontWeight: 'bold', + opacity: 0.07, + }, +}) |