@snowball-tech/fractal
Version:
Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS
3 lines • 1.01 kB
JavaScript
'use client';
import{a as y}from"./chunk-HTOKQYVM.js";import{b as m}from"./chunk-CMFNILWJ.js";import{b as l}from"./chunk-XYM7TA65.js";import{a as e}from"./chunk-PYUYB6K3.js";import h from"lodash/fp/isEmpty";import o from"lodash/fp/isInteger";import $ from"lodash/fp/isNil";import t from"lodash/fp/isNumber";import g from"lodash/fp/omit";import{jsx as n}from"react/jsx-runtime";var d=({children:i,count:r,label:f,limit:a=99,...s})=>{let p=t(r)&&o(r)?`${r}`:"";return t(a)&&a>0&&!h(p)&&(r??0)>a&&(p=`+${a}`),n(y,{"aria-label":f,className:l(`${m}-${e}`,"inline-flex shrink-0 items-center justify-center rounded-full bg-primary",($(r)||!t(r)||!o(r))&&!i?`${m}-${e}--empty h-2 max-h-2 min-h-2 w-2 min-w-2 max-w-2 p-0`:"h-3 max-h-3 w-fit min-w-3",i?`${m}-${e}--with-children p-1`:o(r)?`${m}-${e}--with-count px-half py-0`:"",s.className),element:"div",title:f,variant:"caption-bold",...g(["className"],s),children:i??p})};d.displayName="Badge";var R=d;export{d as a,R as b};
//# sourceMappingURL=chunk-4ML4FV7Y.js.map