mirror of
https://github.com/material-components/material-web.git
synced 2024-08-17 17:40:40 +03:00
fix(tabs): revert isTab
check so it is possible to create your own tab
PiperOrigin-RevId: 568670280
This commit is contained in:
parent
036ea7b04c
commit
e10186e91b
@ -35,6 +35,13 @@ export class Tab extends LitElement {
|
||||
setupHostAria(Tab);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates that the element is a tab for `<md-tabs>`. Useful when
|
||||
* clients implement their own custom `md-tab` components.
|
||||
* @nocollapse
|
||||
*/
|
||||
static readonly isTab = true;
|
||||
|
||||
/**
|
||||
* Whether or not the tab is selected.
|
||||
**/
|
||||
|
@ -307,5 +307,6 @@ export class Tabs extends LitElement {
|
||||
}
|
||||
|
||||
function isTab(element: unknown): element is Tab {
|
||||
return element instanceof Tab;
|
||||
if (!element) return false;
|
||||
return 'isTab' in element.constructor && element.constructor.isTab === true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user