Skip to content

Commit

Permalink
Support as label for text
Browse files Browse the repository at this point in the history
  • Loading branch information
calebjacob committed Jul 31, 2024
1 parent 364fe96 commit fbd5573
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-pagoda/ui",
"version": "0.2.2",
"version": "0.2.3",
"description": "A React component library that implements the official NEAR design system.",
"license": "MIT",
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions src/components/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CSSProperties, ReactNode } from 'react';
import { ThemeColor, ThemeFontSize } from '../utils/types';
import s from './Text.module.scss';

type Tag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
type Tag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'label';

const defaultSizes: Record<Tag, ThemeFontSize> = {
h1: 'text-3xl',
Expand All @@ -14,10 +14,11 @@ const defaultSizes: Record<Tag, ThemeFontSize> = {
h6: 'text-s',
p: 'text-base',
span: 'text-base',
label: 'text-base',
};

type Props = {
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
as?: Tag;
children: ReactNode;
clampLines?: number;
className?: string;
Expand Down

0 comments on commit fbd5573

Please sign in to comment.