(tag: string)
| 9 | } |
| 10 | |
| 11 | function primitive(tag: string) { |
| 12 | return function Primitive({ |
| 13 | children, |
| 14 | onChangeText, |
| 15 | ...props |
| 16 | }: NativeViewProps) { |
| 17 | return createElement(tag, { |
| 18 | ...props, |
| 19 | onChange: onChangeText |
| 20 | ? (event: { target: { value: string } }) => |
| 21 | onChangeText(event.target.value) |
| 22 | : undefined, |
| 23 | children, |
| 24 | }) |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | export const Button = ({ title, onPress }: NativeViewProps) => |
| 29 | createElement('button', { onClick: onPress, children: title }) |
no outgoing calls
no test coverage detected