UNPKG

@opensig/opendesign

Version:

24 lines (23 loc) 696 B
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); const vue = require("vue"); const global = require("./global.js"); function getRoundClass(props, name) { return { class: vue.computed(() => { if (props.round === "pill" || !props.round && global.defaultRound.value === "pill") { return ["-", "_"].includes(name[0]) ? `o${name}-round-pill` : `o-${name}-round-pill`; } return ""; }), style: vue.computed(() => { if (props.round) { return { [`--${name}-radius`]: props.round === "pill" ? "100vh" : props.round }; } return {}; }) }; } exports.getRoundClass = getRoundClass;