UNPKG

@nextcloud/vue

Version:
51 lines (50 loc) 1.75 kB
import '../assets/NcIconToggleSwitch-BrjPjGQL.css'; import { defineComponent, useCssVars, computed, openBlock, createBlock, normalizeClass } from "vue"; import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-g8ubWhoz.mjs"; import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs"; const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 12"> <path d="M17,1H7A5,5 0 0,0 2,6 5,5 0 0,0 7,11H17A5,5 0 0,0 22,6 5,5 0 0,0 17,1Z" /> <circle cy="6" r="3" fill="var(--color-main-background)" /> </svg>`; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "NcIconToggleSwitch", props: { checked: { type: Boolean }, size: { default: 34 }, inline: { type: Boolean, default: false } }, setup(__props) { useCssVars((_ctx) => ({ "v6bd152af": color.value, "v16fd8ca9": cx.value })); const color = computed(() => __props.checked ? "var(--color-primary-element)" : "var(--color-text-maxcontrast)"); const cx = computed(() => __props.checked ? "calc(17 / 24 * 100%)" : "calc(7 / 24 * 100%)"); return (_ctx, _cache) => { return openBlock(), createBlock(NcIconSvgWrapper, { class: normalizeClass(_ctx.$style.iconToggleSwitch), svg, size: __props.size, inline: __props.inline }, null, 8, ["class", "size", "inline"]); }; } }); const iconToggleSwitch = "_iconToggleSwitch_CPPoW"; const style0 = { "material-design-icon": "_material-design-icon_tLFaA", iconToggleSwitch }; const cssModules = { "$style": style0 }; const NcIconToggleSwitch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]); export { NcIconToggleSwitch as N }; //# sourceMappingURL=NcIconToggleSwitch-CWzIC2ar.mjs.map