mirror of
https://github.com/material-components/material-web.git
synced 2026-03-09 00:09:23 +08:00
Changes: - Elevation is now `inset:0;position:absolute;` by default - Separated surface styles into a temporary `<md-elevation-surface>` element (this will be removed after tonal surface update) PiperOrigin-RevId: 521934300
29 lines
634 B
TypeScript
29 lines
634 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import '../../elevation/elevation-surface.js';
|
|
|
|
import {html, TemplateResult} from 'lit';
|
|
import {ClassInfo} from 'lit/directives/class-map.js';
|
|
|
|
import {Button} from './button.js';
|
|
|
|
/**
|
|
* A filled button component.
|
|
*/
|
|
export class FilledButton extends Button {
|
|
protected override getRenderClasses(): ClassInfo {
|
|
return {
|
|
...super.getRenderClasses(),
|
|
'md3-button--filled': true,
|
|
};
|
|
}
|
|
|
|
protected override renderElevation(): TemplateResult {
|
|
return html`<md-elevation-surface shadow></md-elevation-surface>`;
|
|
}
|
|
}
|