mirror of
https://github.com/material-components/material-web.git
synced 2024-09-11 13:46:10 +03:00
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
50 lines
1.4 KiB
TypeScript
50 lines
1.4 KiB
TypeScript
/**
|
||
* @license
|
||
* Copyright 2021 Google LLC
|
||
* SPDX-License-Identifier: Apache-2.0
|
||
*/
|
||
|
||
import {CSSResultOrNative} from 'lit';
|
||
import {customElement} from 'lit/decorators.js';
|
||
|
||
import {FilledTonalButton} from './internal/filled-tonal-button.js';
|
||
import {styles as tonalStyles} from './internal/filled-tonal-styles.js';
|
||
import {styles as sharedElevationStyles} from './internal/shared-elevation-styles.js';
|
||
import {styles as sharedStyles} from './internal/shared-styles.js';
|
||
|
||
declare global {
|
||
interface HTMLElementTagNameMap {
|
||
'md-filled-tonal-button': MdFilledTonalButton;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* @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-filled-tonal-button')
|
||
export class MdFilledTonalButton extends FilledTonalButton {
|
||
static override styles: CSSResultOrNative[] = [
|
||
sharedStyles,
|
||
sharedElevationStyles,
|
||
tonalStyles,
|
||
];
|
||
}
|