@snowball-tech/fractal
Version:
Fractal's (Snowball's design system) React component library based on RadixUI and TailwindCSS
2 lines • 1.14 kB
JavaScript
import{a as e}from"../constants-CW2-utNH.js";import{n as t,r as n}from"../helpers-DBEwVIlX.js";import{Typography as r}from"../Typography/Typography.js";import{GROUP_NAME as i}from"./Header.constants.js";import a from"lodash/fp/isFunction.js";import o from"lodash/fp/omit.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";const l=({children:l,left:u,onClick:d,right:f,...p})=>c(`div`,{className:n(`${e}-${i}`,`flex h-8 w-full items-center gap-1 border-b-2 border-normal bg-primary px-3 pb-[calc(theme(spacing.1)-var(--size-border-2))] pt-1 text-dark`,`@md:h-10 @md:content-stretch @md:justify-stretch @md:gap-0`,p.className),...a(d)?{onClick:d}:{},...o([`className`],p),children:[u?s(`div`,{className:t(`${e}-${i}__left`,`@md:max-h-8 @md:justify-self-start`),children:u}):!1,s(r,{className:t(`${e}-${i}__middle`,`m-0 max-h-full w-full truncate`,`@md:max-h-6 @md:justify-self-center @md:text-center`),element:`div`,variant:`heading-4`,children:l}),f?s(`div`,{className:t(`${e}-${i}__right`,`@md:max-h-6 @md:justify-self-end`),children:f}):!1]});l.displayName=`Header`;export{l as Header,l as default};
//# sourceMappingURL=Header.js.map