Explorar el Código

[Fix typescript] Add title alignment to OptionsTopBarTitle (#4341)

Add title alignment to options
Minh Loi hace 6 años
padre
commit
bd004225b6
Se han modificado 2 ficheros con 7 adiciones y 1 borrados
  1. 2
    1
      docs/docs/styling.md
  2. 5
    0
      lib/src/interfaces/Options.ts

+ 2
- 1
docs/docs/styling.md Ver fichero

@@ -235,7 +235,8 @@ Navigation.mergeOptions(this.props.componentId, {
235 235
     elevation: 1.5, // TopBar elevation in dp
236 236
     topMargin: 24, // top margin in dp
237 237
     title: {
238
-      height: 70 // TitleBar height in dp
238
+      height: 70, // TitleBar height in dp
239
+      alignment: 'center', // Center title
239 240
     }
240 241
   },
241 242
   bottomTabs: {

+ 5
- 0
lib/src/interfaces/Options.ts Ver fichero

@@ -141,6 +141,11 @@ export interface OptionsTopBarTitle {
141 141
    * #### (Android specific)
142 142
    */
143 143
   height?: number;
144
+  /**
145
+   * Title alignment
146
+   * #### (Android specific)
147
+   */
148
+  alignment?: 'center' | 'fill';
144 149
 }
145 150
 
146 151
 export interface OptionsTopBarSubtitle {