material-web/tabs/internal/primary-tab.ts
Elizabeth Mitchell 6b2955bffe fix(tabs)!: secondary tabs always have inline icons
PiperOrigin-RevId: 561157766
2023-08-29 15:39:24 -07:00

27 lines
545 B
TypeScript

/**
* @license
* Copyright 2023 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {property} from 'lit/decorators.js';
import {Tab} from './tab.js';
/**
* A primary tab component.
*/
export class PrimaryTab extends Tab {
/**
* Whether or not the icon renders inline with label or stacked vertically.
*/
@property({type: Boolean, attribute: 'inline-icon'}) inlineIcon = false;
protected override getContentClasses() {
return {
...super.getContentClasses(),
'stacked': !this.inlineIcon,
};
}
}