UNPKG

1.89 kBTypeScriptView Raw
1/**
2 * DO NOT EDIT
3 *
4 * This file was automatically generated by
5 * https://github.com/Polymer/tools/tree/master/packages/gen-typescript-declarations
6 *
7 * To modify these typings, edit the source file(s):
8 * demo-snippet.js
9 */
10
11import {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';
12
13import {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';
14
15import {html} from '@polymer/polymer/lib/utils/html-tag.js';
16
17import {LegacyElementMixin} from '@polymer/polymer/lib/legacy/legacy-element-mixin.js';
18
19/**
20 * `demo-snippet` is a helper element that displays the source of a code snippet
21 * and its rendered demo. It can be used for both native elements and Polymer
22 * elements.
23 *
24 * Example of a native element demo
25 *
26 * <demo-snippet>
27 * <template>
28 * <input type="date">
29 * </template>
30 * </demo-snippet>
31 *
32 * Example of a Polymer <paper-checkbox> demo
33 *
34 * <demo-snippet>
35 * <template>
36 * <paper-checkbox>Checkbox</paper-checkbox>
37 * <paper-checkbox checked>Checkbox</paper-checkbox>
38 * </template>
39 * </demo-snippet>
40 *
41 * ### Styling
42 *
43 * The following custom properties and mixins are available for styling:
44 *
45 * Custom property | Description | Default
46 * ----------------|-------------|----------
47 * `--demo-snippet` | Mixin applied to the entire element | `{}`
48 * `--demo-snippet-demo` | Mixin applied to just the demo section | `{}`
49 * `--demo-snippet-code` | Mixin applied to just the code section | `{}`
50 */
51interface DemoSnippetElement extends LegacyElementMixin, HTMLElement {
52 attached(): void;
53 detached(): void;
54 _updateMarkdown(): void;
55 _copyToClipboard(): any;
56 _resetCopyButtonState(): void;
57}
58
59export {DemoSnippetElement};
60
61declare global {
62
63 interface HTMLElementTagNameMap {
64 "demo-snippet": DemoSnippetElement;
65 }
66}