@start-base/start-ui
Version:
<p align="center"> <a href="https://startbase.dev" target="_blank"> <img src="https://startbase.dev/apple-touch-icon.png" width="60px" style="padding-top: 60px" /> </a> </p>
40 lines (36 loc) • 1.46 kB
text/typescript
import React, { AllHTMLAttributes, ReactNode } from 'react';
type TypographySize = 'small' | 'medium' | 'large' | 'lead';
type TypographyColor = 'default' | 'info' | 'warning' | 'error' | 'success';
type TypographyDecoration = 'underline' | 'overline' | 'linethrough';
type TypographyElement = 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
interface BaseTypographyProps extends Omit<AllHTMLAttributes<HTMLElement>, 'size'> {
color?: TypographyColor;
decoration?: TypographyDecoration;
italic?: boolean;
bold?: boolean;
gradient?: boolean;
children: ReactNode;
className?: string;
}
interface TitleProps extends BaseTypographyProps {
size?: TypographySize;
}
interface SubtitleProps extends BaseTypographyProps {
elementType?: TypographyElement;
}
interface ParagraphProps extends BaseTypographyProps {
size?: TypographySize;
}
interface MutedProps extends BaseTypographyProps {
size?: TypographySize;
}
interface QuoteProps extends BaseTypographyProps {
size?: TypographySize;
}
type CombinedTypographyProps = TitleProps & SubtitleProps & ParagraphProps & MutedProps & QuoteProps;
type TypographyVariant = 'title' | 'subtitle' | 'paragraph' | 'muted' | 'quote';
interface TypographyProps extends CombinedTypographyProps {
variant: TypographyVariant;
}
declare const Typography: React.ForwardRefExoticComponent<TypographyProps & React.RefAttributes<HTMLElement>>;
export { type TypographyProps, Typography as default };