Browse Source

Add disabled height option top OptionScreen

Guy Carmeli 6 years ago
parent
commit
95416d2adc
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      playground/src/screens/OptionsScreen.js

+ 5
- 2
playground/src/screens/OptionsScreen.js View File

@@ -12,6 +12,7 @@ const CUSTOM_BUTTON = 'customButton';
12 12
 const CUSTOM_BUTTON2 = 'customButton2';
13 13
 const BUTTON_LEFT = 'buttonLeft';
14 14
 const FAB = 'fab';
15
+const TOPBAR_HEIGHT = 67;
15 16
 
16 17
 class OptionsScreen extends Component {
17 18
   static get options() {
@@ -23,6 +24,7 @@ class OptionsScreen extends Component {
23 24
       topBar: {
24 25
         title: {
25 26
           text: 'Static Title',
27
+          _height: TOPBAR_HEIGHT,
26 28
           color: 'black',
27 29
           fontSize: 16,
28 30
           alignment: 'center',
@@ -47,6 +49,7 @@ class OptionsScreen extends Component {
47 49
           android: { drawBehind: true },
48 50
           ios: { drawBehind: false, }
49 51
         }),
52
+        _height: TOPBAR_HEIGHT,
50 53
         visible: true,
51 54
         testID: testIDs.TOP_BAR_ELEMENT,
52 55
         rightButtons: [
@@ -116,12 +119,12 @@ class OptionsScreen extends Component {
116 119
         <Button title='Top Bar Opaque' onPress={this.onClickTopBarOpaque} />
117 120
         <Button title='scrollView Screen' testID={testIDs.SCROLLVIEW_SCREEN_BUTTON} onPress={this.onClickScrollViewScreen} />
118 121
         <Button title='Custom Transition' testID={testIDs.CUSTOM_TRANSITION_BUTTON} onPress={this.onClickCustomTranstition} />
119
-        {Platform.OS === 'android' ? <Button title='Hide fab' testID={testIDs.HIDE_FAB} onPress={this.onClickFab} /> : null}
122
+        {Platform.OS === 'android' && <Button title='Hide fab' testID={testIDs.HIDE_FAB} onPress={this.onClickFab} />}
120 123
         <Button title='Show overlay' testID={testIDs.SHOW_OVERLAY_BUTTON} onPress={() => this.onClickShowOverlay(true)} />
121 124
         <Button title='Show touch through overlay' testID={testIDs.SHOW_TOUCH_THROUGH_OVERLAY_BUTTON} onPress={() => this.onClickShowOverlay(false)} />
122 125
         <Button title='Push Default Options Screen' testID={testIDs.PUSH_DEFAULT_OPTIONS_BUTTON} onPress={this.onClickPushDefaultOptionsScreen} />
123 126
         <Button title='Show TopBar react view' testID={testIDs.SHOW_TOPBAR_REACT_VIEW} onPress={this.onShowTopBarReactView} />
124
-        {Platform.OS === 'android' ? <Button title='Push' testID={testIDs.PUSH_BUTTON} onPress={this.onPush} /> : null}
127
+        {Platform.OS === 'android' && <Button title='Push' testID={testIDs.PUSH_BUTTON} onPress={this.onPush} />}
125 128
         <Text style={styles.footer}>{`this.props.containerId = ${this.props.containerId}`}</Text>
126 129
       </View>
127 130
     );