fix emoji picker dark mode
This commit is contained in:
@@ -1,13 +1,16 @@
|
|||||||
|
import {useColorScheme} from 'react-native'
|
||||||
|
|
||||||
import {type EmojiPickerViewProps} from './EmojiPickerModule.types'
|
import {type EmojiPickerViewProps} from './EmojiPickerModule.types'
|
||||||
import EmojiPickerNativeView from './EmojiPickerView'
|
import EmojiPickerNativeView from './EmojiPickerView'
|
||||||
|
|
||||||
const EmojiPicker = ({onEmojiSelected}: EmojiPickerViewProps) => {
|
const EmojiPicker = ({onEmojiSelected}: EmojiPickerViewProps) => {
|
||||||
|
const scheme = useColorScheme()
|
||||||
return (
|
return (
|
||||||
<EmojiPickerNativeView
|
<EmojiPickerNativeView
|
||||||
onEmojiSelected={emoji => {
|
onEmojiSelected={emoji => {
|
||||||
onEmojiSelected(emoji)
|
onEmojiSelected(emoji)
|
||||||
}}
|
}}
|
||||||
style={styles}
|
style={[styles, {backgroundColor: scheme === 'dark' ? '#000' : '#fff'}]}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -15,7 +18,6 @@ const EmojiPicker = ({onEmojiSelected}: EmojiPickerViewProps) => {
|
|||||||
const styles = {
|
const styles = {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
backgroundColor: 'white',
|
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export default EmojiPicker
|
export default EmojiPicker
|
||||||
|
|||||||
Reference in New Issue
Block a user