UNPKG

@zeriontech/components

Version:

UI Components used in Zerion Web projects

2 lines (1 loc) 980 B
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),h=require("./classnames-47152645.cjs"),m="_uitext_tij8c_1",g={uitext:m},r={"headline/hero":[40,48,500,"-0.5px"],"headline/h1":[32,36,500,"-0.25px"],"headline/h2":[24,28,500,"normal"],"headline/h3":[20,24,500,"normal"],"body/accent":[16,24,500,"0.25px"],"body/regular":[16,24,400,"0.1px"],"small/accent":[14,20,500,"0.3px"],"small/regular":[14,20,400,"0.2px"],"caption/accent":[12,16,500,"0.38px"],"caption/regular":[12,16,400,"0.38px"]},f=e=>{const t=r[e];if(!t)throw new Error(`Unsupported text kind: ${e}`);return t},y=({as:e,inline:t=!1,kind:a,color:o="currentColor",className:l,style:s,...i},c)=>{const[x,u,p,d]=f(a);return n.createElement(e||"div",{ref:c,className:h.classnames(l,g.uitext),style:{display:t?"inline-block":void 0,fontSize:x,lineHeight:`${u}px`,fontWeight:p,letterSpacing:d,color:o,...s},...i})},b=n.forwardRef(y);exports.UIText=b;exports.uiTextParams=r;