mirror of
https://github.com/material-components/material-web.git
synced 2024-10-27 06:04:44 +03:00
9796f6a694
PiperOrigin-RevId: 495414969
46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
/**
|
||
* @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 {IconButton} from './lib/icon-button.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': MdStandardIconButton;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* @summary Icon buttons help people take supplementary actions with a single
|
||
* tap.
|
||
*
|
||
* @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')
|
||
export class MdStandardIconButton extends IconButton {
|
||
static override styles = [sharedStyles, styles];
|
||
|
||
protected override getRenderClasses(): ClassInfo {
|
||
return {
|
||
...super.getRenderClasses(),
|
||
'md3-icon-button--standard': true,
|
||
};
|
||
}
|
||
}
|