mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-04 23:44:41 +00:00
24 lines
551 B
TypeScript
Vendored
24 lines
551 B
TypeScript
Vendored
import React from 'react';
|
|
import type { ViewProps } from 'react-native';
|
|
|
|
import NativeViewHostNativeComponent from './NativeViewHostNativeComponent';
|
|
|
|
export type NativeViewHostProps = ViewProps & {
|
|
viewName: string;
|
|
nativeProps?: Record<string, unknown>;
|
|
};
|
|
|
|
export default function NativeViewHost({
|
|
viewName,
|
|
nativeProps,
|
|
...props
|
|
}: NativeViewHostProps): React.JSX.Element {
|
|
return (
|
|
<NativeViewHostNativeComponent
|
|
{...props}
|
|
viewName={viewName}
|
|
nativePropsJson={JSON.stringify(nativeProps ?? {})}
|
|
/>
|
|
);
|
|
}
|