igniteui-webcomponents
Version:
Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.
26 lines • 995 B
JavaScript
import { LitElement, html } from 'lit';
import { registerComponent } from '../common/definitions/register.js';
import { createCounter } from '../common/util.js';
import { styles } from './themes/tab-panel.base.css.js';
class IgcTabPanelComponent extends LitElement {
static register() {
registerComponent(IgcTabPanelComponent);
}
connectedCallback() {
super.connectedCallback();
this.setAttribute('role', 'tabpanel');
this.tabIndex = this.hasAttribute('tabindex') ? this.tabIndex : 0;
this.slot = this.slot.length > 0 ? this.slot : 'panel';
this.id =
this.getAttribute('id') ||
`igc-tab-panel-${IgcTabPanelComponent.increment()}`;
}
render() {
return html `<slot></slot>`;
}
}
IgcTabPanelComponent.tagName = 'igc-tab-panel';
IgcTabPanelComponent.styles = styles;
IgcTabPanelComponent.increment = createCounter();
export default IgcTabPanelComponent;
//# sourceMappingURL=tab-panel.js.map