2 lines
1.7 KiB
JavaScript
2 lines
1.7 KiB
JavaScript
import{_ as n,c as d,a as i,g as u,p,n as g}from"./index-BUdRbiwj.js";const b={__name:"FPBadge",props:{variant:{type:String,default:"default",validator:t=>["default","primary","secondary","success","warning","error","info"].includes(t)},size:{type:String,default:"md",validator:t=>["xs","sm","md","lg"].includes(t)},outline:{type:Boolean,default:!1},pill:{type:Boolean,default:!1},dot:{type:Boolean,default:!1}},setup(t){const e=t,o=d(()=>{const r=["inline-flex items-center justify-center font-medium","transition-colors duration-200"],s={xs:e.dot?["w-1.5 h-1.5"]:["px-1.5 py-0.5 text-xs"],sm:e.dot?["w-2 h-2"]:["px-2 py-0.5 text-xs"],md:e.dot?["w-2.5 h-2.5"]:["px-2.5 py-0.5 text-xs"],lg:e.dot?["w-3 h-3"]:["px-3 py-1 text-sm"]},a=[];e.pill||e.dot?a.push("rounded-full"):a.push("rounded");const l={default:e.outline?["bg-white text-gray-700 border border-gray-300"]:["bg-gray-100 text-gray-800"],primary:e.outline?["bg-white text-primary-700 border border-primary-300"]:["bg-primary-100 text-primary-800"],secondary:e.outline?["bg-white text-gray-700 border border-gray-300"]:["bg-gray-100 text-gray-800"],success:e.outline?["bg-white text-green-700 border border-green-300"]:["bg-green-100 text-green-800"],warning:e.outline?["bg-white text-yellow-700 border border-yellow-300"]:["bg-yellow-100 text-yellow-800"],error:e.outline?["bg-white text-red-700 border border-red-300"]:["bg-red-100 text-red-800"],info:e.outline?["bg-white text-blue-700 border border-blue-300"]:["bg-blue-100 text-blue-800"]};return[...r,...s[e.size],...a,...l[e.variant]].flat()});return(r,s)=>(u(),i("span",{class:g(o.value)},[p(r.$slots,"default",{},void 0,!0)],2))}},x=n(b,[["__scopeId","data-v-39ba8990"]]);export{x as F};
|