about summary refs log tree commit diff
path: root/modules/expo-emoji-picker/src/EmojiPickerView.tsx
blob: 0dff25fb552b1cb8fe7253e7bca89be56acca550 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import {requireNativeView} from 'expo'
import type * as React from 'react'

import {
  type EmojiPickerNativeViewProps,
  type EmojiPickerViewProps,
} from './EmojiPickerModule.types'

const NativeView: React.ComponentType<EmojiPickerNativeViewProps> =
  requireNativeView('EmojiPicker')

export default function EmojiPicker(props: EmojiPickerViewProps) {
  return (
    <NativeView
      {...props}
      onEmojiSelected={({nativeEvent}) => {
        props.onEmojiSelected(nativeEvent.emoji)
      }}
    />
  )
}