Skip to content

Commit

Permalink
Add heading size xs used in designs
Browse files Browse the repository at this point in the history
  • Loading branch information
hasparus committed Nov 1, 2024
1 parent 5a457af commit 20cabcc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/components/src/components/heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { cn } from '../cn';

export interface HeadingProps extends ComponentPropsWithoutRef<'h1'> {
as: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'p' | 'span';
size: 'xl' | 'lg' | 'md' | 'sm';
size: 'xl' | 'lg' | 'md' | 'sm' | 'xs';
}
export function Heading({ as: _as, size, className, children, ...rest }: HeadingProps) {
const Level = _as || 'h2';
Expand All @@ -24,6 +24,9 @@ export function Heading({ as: _as, size, className, children, ...rest }: Heading
case 'sm':
sizeStyle = 'text-[40px] leading-[1.2] tracking-[-0.2px]';
break;
case 'xs':
sizeStyle = 'text-[32px]/[1.25] tracking-[-0.16px]';
break;
}

const id =
Expand Down

0 comments on commit 20cabcc

Please sign in to comment.