Using button created from SwiftUI in ReactNative
This commit is contained in:
parent
97fb795866
commit
41081b5084
7 changed files with 52 additions and 1 deletions
4
App.tsx
4
App.tsx
|
@ -11,6 +11,7 @@ type CustomButtonProps = {
|
|||
style?: StyleProp<ViewStyle>
|
||||
}
|
||||
const CustomButton = requireNativeComponent<CustomButtonProps>('CustomButton')
|
||||
const BaseButton = requireNativeComponent<CustomButtonProps>('BaseButton')
|
||||
|
||||
export default function App() {
|
||||
const isDarkMode = useColorScheme() === 'dark'
|
||||
|
@ -33,7 +34,8 @@ export default function App() {
|
|||
<View style={styles.container}>
|
||||
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
|
||||
<Text>{message ?? 'Waiting for message...'}</Text>
|
||||
<CustomButton style={{ width: 200, height: 200 }} />
|
||||
<CustomButton style={{ height: 200 }} />
|
||||
<BaseButton style={{ height: 200 }} />
|
||||
<NewAppScreen templateFileName="App.tsx" />
|
||||
</View>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue