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.

39 lines (36 loc) 1.09 kB
let _ = t => t, _t, _t2; /** * @license * * Copyright IBM Corp. 2019 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { html } from 'lit-html'; import settings from 'carbon-components/es/globals/js/settings'; import LOADING_TYPE from './types'; const { prefix } = settings; /** * @param Object options The options. * @param [options.assistiveText] The assistive text for the spinner icon. * @param [options.type] The spinner type. * @returns The spinner icon. */ export default (({ assistiveText, type }) => html(_t || (_t = _` <svg class="${0}--loading__svg" viewBox="-75 -75 150 150"> ${0} <circle ?hidden="${0}" class="${0}--loading__background" cx="0" cy="0" r="37.5" /> <circle class="${0}--loading__stroke" cx="0" cy="0" r="37.5" /> </svg> `), prefix, !assistiveText ? undefined : html(_t2 || (_t2 = _` <title>${0}</title> `), assistiveText), type !== LOADING_TYPE.SMALL, prefix, prefix)); //# sourceMappingURL=loading-icon.js.map