Skip to content

Commit 45583bc

Browse files
committed
fix(tabs): update the tabbar placement value to match the property it applies to
1 parent 7628b36 commit 45583bc

File tree

3 files changed

+38
-17
lines changed

3 files changed

+38
-17
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export type TabbarLayout = 'icon-top' | 'icon-start' | 'icon-end' | 'icon-bottom' | 'icon-hide' | 'title-hide';
1+
export type TabbarLayout = 'icon-top' | 'icon-start' | 'icon-end' | 'icon-bottom' | 'icon-hide' | 'label-hide';
22
export type TabbarPlacement = 'top' | 'bottom';

core/src/components/tabbar/tabbar.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,22 @@ export class Tabbar {
2626
@State() canScrollRight = false;
2727
@State() hidden = false;
2828

29-
/** The layout of the title and icons */
29+
/**
30+
* Set the layout of the text and icon in the tabbar. Available options: `"icon-top"`, `"icon-start"`, `"icon-end"`, `"icon-bottom"`, `"icon-hide"`, `"label-hide"`.
31+
*/
3032
@Prop() layout: TabbarLayout = 'icon-top';
3133

32-
/** The placement of the tabbar in the app */
34+
/**
35+
* Set the position of the tabbar, relative to the content. Available options: `"top"`, `"bottom"`.
36+
*/
3337
@Prop() placement: TabbarPlacement = 'bottom';
3438

3539
/** The selected tab component */
3640
@Prop() selectedTab?: HTMLIonTabElement;
3741

38-
/** If the tabbar is scrollable or not */
42+
/**
43+
* If true, the tabs will be scrollable when there are enough tabs to overflow the width of the screen.
44+
*/
3945
@Prop() scrollable = false;
4046

4147
/** The tabs to render */
@@ -47,8 +53,9 @@ export class Tabbar {
4753
this.highlight && this.updateHighlight();
4854
}
4955

50-
51-
/** If the tabbar should include the highlight on the active tab */
56+
/**
57+
* If true, show the tab highlight bar under the selected tab.
58+
*/
5259
@Prop() highlight = false;
5360

5461
/**

core/src/components/tabs/tabs.tsx

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export class Tabs implements NavOutlet {
2020
@State() selectedTab?: HTMLIonTabElement;
2121

2222
@Prop({ context: 'config' }) config!: Config;
23+
2324
@Prop({ context: 'document' }) doc!: Document;
2425

2526
/**
@@ -29,29 +30,29 @@ export class Tabs implements NavOutlet {
2930
@Prop() color?: Color;
3031

3132
/**
32-
* A unique name for the tabs
33+
* A unique name for the tabs.
3334
*/
3435
@Prop() name?: string;
3536

3637
/**
37-
* If true, the tabbar
38+
* If true, the tabbar will be hidden. Defaults to `false`.
3839
*/
3940
@Prop() tabbarHidden = false;
4041

4142
/**
42-
* Set the tabbar layout: `icon-top`, `icon-start`, `icon-end`, `icon-bottom`, `icon-hide`, `title-hide`.
43+
* If true, show the tab highlight bar under the selected tab.
4344
*/
44-
@Prop({ mutable: true }) tabbarLayout?: TabbarLayout;
45+
@Prop({ mutable: true }) tabbarHighlight?: boolean;
4546

4647
/**
47-
* Set position of the tabbar: `top`, `bottom`.
48+
* Set the layout of the text and icon in the tabbar. Available options: `"icon-top"`, `"icon-start"`, `"icon-end"`, `"icon-bottom"`, `"icon-hide"`, `"label-hide"`.
4849
*/
49-
@Prop({ mutable: true }) tabbarPlacement?: TabbarPlacement;
50+
@Prop({ mutable: true }) tabbarLayout?: TabbarLayout;
5051

5152
/**
52-
* If true, show the tab highlight bar under the selected tab.
53+
* Set the position of the tabbar, relative to the content. Available options: `"top"`, `"bottom"`.
5354
*/
54-
@Prop({ mutable: true }) tabbarHighlight?: boolean;
55+
@Prop({ mutable: true }) tabbarPlacement?: TabbarPlacement;
5556

5657
/**
5758
* If true, the tabs will be translucent.
@@ -61,21 +62,34 @@ export class Tabs implements NavOutlet {
6162
*/
6263
@Prop() translucent = false;
6364

64-
/** If the tabs should be scrollable */
65+
/**
66+
* If true, the tabs will be scrollable when there are enough tabs to overflow the width of the screen.
67+
*/
6568
@Prop() scrollable = false;
6669

6770
/**
68-
* If the tabs should use the router or not.
69-
* If true, `selectedTab` does nothing.
71+
* If true, the tabs will use the router and `selectedTab` will not do anything.
7072
*/
7173
@Prop({ mutable: true }) useRouter = false;
7274

7375
/**
7476
* Emitted when the tab changes.
7577
*/
7678
@Event() ionChange!: EventEmitter<{tab: HTMLIonTabElement}>;
79+
80+
/**
81+
* Emitted when the navigation will load a component.
82+
*/
7783
@Event() ionNavWillLoad!: EventEmitter<void>;
84+
85+
/**
86+
* Emitted when the navigation is about to transition to a new component.
87+
*/
7888
@Event() ionNavWillChange!: EventEmitter<void>;
89+
90+
/**
91+
* Emitted when the navigation has finished transitioning to a new component.
92+
*/
7993
@Event() ionNavDidChange!: EventEmitter<void>;
8094

8195
componentWillLoad() {

0 commit comments

Comments
 (0)