@opensig/opendesign
Version:
24 lines (23 loc) • 593 B
JavaScript
import { computed } from "vue";
import { defaultRound } from "./global.mjs";
function getRoundClass(props, name) {
return {
class: computed(() => {
if (props.round === "pill" || !props.round && defaultRound.value === "pill") {
return ["-", "_"].includes(name[0]) ? `o${name}-round-pill` : `o-${name}-round-pill`;
}
return "";
}),
style: computed(() => {
if (props.round) {
return {
[`--${name}-radius`]: props.round === "pill" ? "100vh" : props.round
};
}
return {};
})
};
}
export {
getRoundClass
};