mirror of
https://github.com/material-components/material-web.git
synced 2024-11-09 16:19:39 +03:00
74bda6e11c
PiperOrigin-RevId: 495160072
45 lines
1.3 KiB
TypeScript
45 lines
1.3 KiB
TypeScript
/**
|
||
* @license
|
||
* Copyright 2021 Google LLC
|
||
* SPDX-License-Identifier: Apache-2.0
|
||
*/
|
||
|
||
import {customElement} from 'lit/decorators.js';
|
||
|
||
import {styles as sharedElevationStyles} from './lib/shared-elevation-styles.css.js';
|
||
import {styles as sharedStyles} from './lib/shared-styles.css.js';
|
||
import {TonalButton} from './lib/tonal-button.js';
|
||
import {styles as tonalStyles} from './lib/tonal-styles.css.js';
|
||
|
||
declare global {
|
||
interface HTMLElementTagNameMap {
|
||
'md-tonal-button': MdTonalButton;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* @summary Buttons help people take action, such as sending an email, sharing a
|
||
* document, or liking a comment.
|
||
*
|
||
* @description
|
||
* __Emphasis:__ Medium emphasis – For important actions that don’t distract
|
||
* from other onscreen elements.
|
||
*
|
||
* __Rationale:__ Filled tonal buttons have a lighter background color and
|
||
* darker label color, making them less visually prominent than a regular,
|
||
* filled button. They’re still used for final or unblocking actions in a flow,
|
||
* but do so with less emphasis.
|
||
*
|
||
* __Example usages:__
|
||
* - Save
|
||
* - Confirm
|
||
* - Done
|
||
*
|
||
* @final
|
||
* @suppress {visibility}
|
||
*/
|
||
@customElement('md-tonal-button')
|
||
export class MdTonalButton extends TonalButton {
|
||
static override styles = [sharedStyles, sharedElevationStyles, tonalStyles];
|
||
}
|