Make broadcast picker required in iOS only
This commit is contained in:
parent
a751360632
commit
8985ea02d9
12
App.js
12
App.js
@ -8,7 +8,7 @@
|
||||
|
||||
import React from 'react';
|
||||
import type {Node} from 'react';
|
||||
import BroadcastPicker from './react/BroadcastPicker';
|
||||
import Header from './react/Header';
|
||||
|
||||
import {
|
||||
SafeAreaView,
|
||||
@ -20,13 +20,7 @@ import {
|
||||
View,
|
||||
} from 'react-native';
|
||||
|
||||
import {
|
||||
Colors,
|
||||
DebugInstructions,
|
||||
Header,
|
||||
LearnMoreLinks,
|
||||
ReloadInstructions,
|
||||
} from 'react-native/Libraries/NewAppScreen';
|
||||
import {Colors, DebugInstructions} from 'react-native/Libraries/NewAppScreen';
|
||||
|
||||
const Section = ({children, title}): Node => {
|
||||
const isDarkMode = useColorScheme() === 'dark';
|
||||
@ -63,7 +57,7 @@ const App: () => Node = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<BroadcastPicker/>
|
||||
<Header />
|
||||
<SafeAreaView style={backgroundStyle}>
|
||||
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
|
||||
<ScrollView
|
||||
|
@ -1,12 +0,0 @@
|
||||
import React from 'react';
|
||||
import SystemBroadcastPicker from './ios-native-components/BBBN_SystemBroadcastPicker';
|
||||
|
||||
const BroadcastPicker = ({children, title}): Node => {
|
||||
return (
|
||||
<SystemBroadcastPicker
|
||||
style={{marginTop: 50, height: 50, widht: 50, backgroundColor: '#EEE'}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default BroadcastPicker;
|
24
react/Header.js
Normal file
24
react/Header.js
Normal file
@ -0,0 +1,24 @@
|
||||
import React from 'react';
|
||||
import SystemBroadcastPicker from './ios/native-components/BBBN_SystemBroadcastPicker';
|
||||
import {Platform, StyleSheet} from 'react-native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
broacastPicker: {
|
||||
...Platform.select({
|
||||
ios: {
|
||||
marginTop: 50,
|
||||
height: 50,
|
||||
widht: 50,
|
||||
backgroundColor: '#EEE',
|
||||
},
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
const Header = ({children, title}): Node => {
|
||||
return Platform.select({
|
||||
ios: <SystemBroadcastPicker style={styles.broacastPicker} />,
|
||||
});
|
||||
};
|
||||
|
||||
export default Header;
|
Loading…
Reference in New Issue
Block a user