mirror of
https://github.com/material-components/material-web.git
synced 2024-09-11 21:57:41 +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
33 lines
750 B
TypeScript
33 lines
750 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import {CSSResultOrNative} from 'lit';
|
|
import {customElement} from 'lit/decorators.js';
|
|
|
|
import {Switch} from './internal/switch.js';
|
|
import {styles} from './internal/switch-styles.js';
|
|
|
|
declare global {
|
|
interface HTMLElementTagNameMap {
|
|
'md-switch': MdSwitch;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @summary Switches toggle the state of a single item on or off.
|
|
*
|
|
* @description
|
|
* There's one type of switch in Material. Use this selection control when the
|
|
* user needs to toggle a single item on or off.
|
|
*
|
|
* @final
|
|
* @suppress {visibility}
|
|
*/
|
|
@customElement('md-switch')
|
|
export class MdSwitch extends Switch {
|
|
static override styles: CSSResultOrNative[] = [styles];
|
|
}
|