UNPKG

carbon-custom-elements

Version:

A Carbon Design System variant that's as easy to use as native HTML elements, with no framework tax, no framework silo.

1 lines 1.55 kB
{"version":3,"sources":["components/code-snippet/code-snippet-skeleton.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAiC,UAAU,EAAE,MAAM,aAAa,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAKnD;;GAEG;AACH,cACM,qBAAsB,SAAQ,UAAU;IAC5C;;OAEG;IAEH,IAAI,oBAA4B;IAEhC,MAAM;IAcN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,qBAAqB,CAAC","file":"code-snippet-skeleton.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, property, customElement, LitElement } from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings';\nimport { CODE_SNIPPET_TYPE } from './code-snippet';\nimport styles from './code-snippet.scss';\n\nconst { prefix } = settings;\n\n/**\n * Skeleton of code snippet.\n */\n@customElement(`${prefix}-code-snippet-skeleton`)\nclass BXCodeSnippetSkeleton extends LitElement {\n /**\n * The type of code snippet. Corresponds to the attribute with the same name.\n */\n @property({ reflect: true })\n type = CODE_SNIPPET_TYPE.SINGLE;\n\n render() {\n return html`\n <div class=\"${prefix}--snippet-container\">\n ${this.type !== CODE_SNIPPET_TYPE.MULTI\n ? html`\n <span></span>\n `\n : html`\n <span></span><span></span><span></span>\n `}\n </div>\n `;\n }\n\n static styles = styles;\n}\n\nexport default BXCodeSnippetSkeleton;\n"]}