fix(all): update types to be required (#16218)

This commit is contained in:
Manu MA
2018-11-03 20:54:58 +01:00
committed by GitHub
parent a9811169fc
commit 091625df64
11 changed files with 34 additions and 41 deletions

View File

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

View File

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