mirror of
https://github.com/material-components/material-web.git
synced 2024-10-26 21:56:56 +03:00
c35bad0c64
We are changing the names of these files to reduce similarity with CSS modules and avoid clashing with tooling built around that. If you're importing `*/internal/styles.css.js`, swap to `*/internal/styles.js`. PiperOrigin-RevId: 611265000
49 lines
1.2 KiB
TypeScript
49 lines
1.2 KiB
TypeScript
/**
|
||
* @license
|
||
* Copyright 2022 Google LLC
|
||
* SPDX-License-Identifier: Apache-2.0
|
||
*/
|
||
|
||
import {CSSResultOrNative} from 'lit';
|
||
import {customElement} from 'lit/decorators.js';
|
||
|
||
import {IconButton} from './internal/icon-button.js';
|
||
import {styles} from './internal/outlined-styles.js';
|
||
import {styles as sharedStyles} from './internal/shared-styles.js';
|
||
|
||
declare global {
|
||
interface HTMLElementTagNameMap {
|
||
'md-outlined-icon-button': MdOutlinedIconButton;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* @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
|
||
*
|
||
* @final
|
||
* @suppress {visibility}
|
||
*/
|
||
@customElement('md-outlined-icon-button')
|
||
export class MdOutlinedIconButton extends IconButton {
|
||
static override styles: CSSResultOrNative[] = [sharedStyles, styles];
|
||
|
||
protected override getRenderClasses() {
|
||
return {
|
||
...super.getRenderClasses(),
|
||
'outlined': true,
|
||
};
|
||
}
|
||
}
|