mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
fix(all): update types to be required (#16218)
This commit is contained in:
@ -17,7 +17,7 @@ See the [Tabs API Docs](../Tabs/) for more details on configuring Tabs.
|
||||
| `href` | `href` | The URL which will be used as the `href` within this tab's button anchor. | `string \| undefined` | `undefined` |
|
||||
| `layout` | `layout` | Set the layout of the text and icon in the tab bar. It defaults to `'icon-top'`. | `"icon-bottom" \| "icon-end" \| "icon-hide" \| "icon-start" \| "icon-top" \| "label-hide" \| undefined` | `undefined` |
|
||||
| `mode` | `mode` | The mode determines which platform styles to use. | `"ios" \| "md"` | `undefined` |
|
||||
| `tab` | `tab` | A tab id must be provided for each `ion-tab`. It's used internally to reference the selected tab or by the router to switch between them. | `string \| undefined` | `undefined` |
|
||||
| `tab` | `tab` | A tab id must be provided for each `ion-tab`. It's used internally to reference the selected tab or by the router to switch between them. | `string` | `undefined` |
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
|
@ -51,7 +51,7 @@ export class TabButton implements ComponentInterface {
|
||||
* A tab id must be provided for each `ion-tab`. It's used internally to reference
|
||||
* the selected tab or by the router to switch between them.
|
||||
*/
|
||||
@Prop() tab?: string;
|
||||
@Prop() tab!: string;
|
||||
|
||||
/**
|
||||
* The selected tab component
|
||||
@ -84,10 +84,6 @@ export class TabButton implements ComponentInterface {
|
||||
if (this.layout === undefined) {
|
||||
this.layout = this.config.get('tabButtonLayout', 'icon-top');
|
||||
}
|
||||
if (this.tab === undefined) {
|
||||
console.warn(`ion-tab-button needs a tab name, so it can be selected.
|
||||
<ion-tab-button tab="TAB_NAME">`);
|
||||
}
|
||||
}
|
||||
|
||||
private get hasLabel() {
|
||||
|
Reference in New Issue
Block a user