tooot/src/screens/Compose/Posting.tsx

28 lines
646 B
TypeScript
Raw Normal View History

2021-01-14 22:53:01 +01:00
import React, { useContext } from 'react'
2021-01-22 01:34:20 +01:00
import { Modal, View } from 'react-native'
2021-01-14 22:53:01 +01:00
import { useTheme } from '@utils/styles/ThemeManager'
import ComposeContext from './utils/createContext'
const ComposePosting = React.memo(
() => {
const { composeState } = useContext(ComposeContext)
2022-02-12 14:51:01 +01:00
const { colors } = useTheme()
2021-01-14 22:53:01 +01:00
return (
<Modal
transparent
animationType='fade'
visible={composeState.posting}
children={
2022-02-12 14:51:01 +01:00
<View
style={{ flex: 1, backgroundColor: colors.backgroundOverlayInvert }}
/>
2021-01-14 22:53:01 +01:00
}
/>
)
},
() => true
)
export default ComposePosting