Browse Source

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

Add title alignment to options
Minh Loi 6 years ago
parent
commit
bd004225b6
2 changed files with 7 additions and 1 deletions
  1. 2
    1
      docs/docs/styling.md
  2. 5
    0
      lib/src/interfaces/Options.ts

+ 2
- 1
docs/docs/styling.md View File

@@ -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 View File

@@ -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 {