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