UNPKG

@fifteen/design-system-vue

Version:

Vue 3 (Composition API + Typescript) implementation of the Fifteen Design System

2 lines (1 loc) 633 B
"use strict";const e=require("vue"),a=require("../../utils/getCssColor.js"),n=e.defineComponent({__name:"FFieldLabel",props:{label:{},type:{default:"label"},name:{},textColor:{default:"neutral--dark-4"}},setup(l){const o=l,r=e.computed(()=>({"--ffieldlabel--text-color":a.getCssColor(o.textColor)}));return(t,s)=>t.label!==""?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type),{key:0,class:"FFieldLabel",for:t.type==="label"?t.name:null,style:e.normalizeStyle(e.unref(r))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1},8,["for","style"])):e.createCommentVNode("",!0)}});module.exports=n;