material-web/iconbutton/standard-icon-button-toggle.ts
Material Web Team 9796f6a694 Document Icon Button
PiperOrigin-RevId: 495414969
2022-12-14 14:18:45 -08:00

46 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {customElement} from 'lit/decorators.js';
import {ClassInfo} from 'lit/directives/class-map.js';
import {IconButtonToggle} from './lib/icon-button-toggle.js';
import {styles as sharedStyles} from './lib/shared-styles.css.js';
import {styles} from './lib/standard-styles.css.js';
declare global {
interface HTMLElementTagNameMap {
'md-standard-icon-button-toggle': MdStandardIconButtonToggle;
}
}
/**
* @summary Icon buttons help people take supplementary actions with a single
* tap. This variant can toggle between icons.
*
* @description
* __Emphasis:__ Low emphasis For optional or supplementary actions with the
* least amount of prominence.
*
* __Rationale:__ The most compact and unobtrusive type of button, icon buttons
* are used for optional supplementary actions such as "Bookmark" or "Star."
*
* __Example usages:__
* - Add to Favorites
* - Print
*/
@customElement('md-standard-icon-button-toggle')
export class MdStandardIconButtonToggle extends IconButtonToggle {
static override styles = [sharedStyles, styles];
protected override getRenderClasses(): ClassInfo {
return {
...super.getRenderClasses(),
'md3-icon-button--standard': true,
};
}
}