1 line
1.2 KiB
JavaScript
1 line
1.2 KiB
JavaScript
import{a as b,j as e}from"./vendor-react-BHG7lGYR.js";import{d as y}from"./index-BWcMVITa.js";const u=b.forwardRef(({label:d,variant:a="cyan",icon:t,size:s="md",dot:n,count:o,children:l,className:m,...i},p)=>{const c={default:"cyan",primary:"cyan",success:"lime",warning:"gold",error:"magenta",secondary:"magenta"}[a]||a,r={cyan:"bg-kodo-steel/10 text-kodo-steel border-kodo-steel/30",magenta:"bg-kodo-magenta/10 text-kodo-magenta border-kodo-magenta/30",lime:"bg-kodo-lime/10 text-kodo-lime border-kodo-lime/30",gold:"bg-kodo-gold/10 text-kodo-gold border-kodo-gold/30",terminal:"bg-kodo-terminal/10 text-kodo-terminal border-kodo-terminal/30 font-mono"},x={sm:"px-2 py-0.5 text-[10px]",md:"px-2.5 py-0.5 text-[10px]",lg:"px-4 py-1 text-xs"},g=d||l,k=c;return e.jsxs("span",{ref:p,className:y("inline-flex items-center gap-1.5 rounded-full font-bold uppercase tracking-widest border",r[k]||r.cyan,x[s],m),...i,children:[n&&e.jsx("span",{className:"w-3 h-3 rounded-full bg-current"}),t&&e.jsx("span",{className:"w-3 h-3",children:t}),g,o!==void 0&&o>0&&e.jsx("span",{className:"ml-1 px-1.5 py-0.5 rounded-full bg-current/20 text-[10px]",children:o})]})});u.displayName="Badge";export{u as B};
|