mirror of
https://github.com/material-components/material-web.git
synced 2024-09-21 02:27:12 +03:00
a117b06b7b
PiperOrigin-RevId: 552545415
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
/**
|
||
* @license
|
||
* Copyright 2021 Google LLC
|
||
* SPDX-License-Identifier: Apache-2.0
|
||
*/
|
||
|
||
import {customElement} from 'lit/decorators.js';
|
||
|
||
import {IconButton} from './internal/icon-button.js';
|
||
import {styles as sharedStyles} from './internal/shared-styles.css.js';
|
||
import {styles} from './internal/standard-styles.css.js';
|
||
|
||
declare global {
|
||
interface HTMLElementTagNameMap {
|
||
'md-icon-button': MdIconButton;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* @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-icon-button')
|
||
export class MdIconButton extends IconButton {
|
||
static override styles = [sharedStyles, styles];
|
||
|
||
protected override getRenderClasses() {
|
||
return {
|
||
...super.getRenderClasses(),
|
||
'standard': true,
|
||
};
|
||
}
|
||
}
|