@tapie-kr/inspire-react
Version:
React Component Collection for INSPIRE
20 lines (17 loc) • 1.95 kB
JavaScript
/* eslint-disable */
/*
* INSPIRE : Creative Kit
* React Component Collection for INSPIRE
*
* This file is generated automatically. Do not modify it manually
* Generated at : 2025. 3. 4. 오후 6:18:13
* @tapie-kr/inspire-react version: 0.2.15
*
* (c) 2025 TAPIE. All rights reserved.
* MIT License
*/
import { jsx } from 'react/jsx-runtime';
import TypographyBuilder from './builder.js';
import { TypographyTag, TypographyVariant, typographyVariantClass } from './shared.js';
const TypographyContract={[TypographyVariant.GIANT]:TypographyTag.H1,[TypographyVariant.JUMBO]:TypographyTag.H1,[TypographyVariant.LARGE]:TypographyTag.H1,[TypographyVariant.MEDIUM]:TypographyTag.H2,[TypographyVariant.MODERATE]:TypographyTag.H3,[TypographyVariant.BASE]:TypographyTag.P,[TypographyVariant.PETITE]:TypographyTag.P,[TypographyVariant.MICRO]:TypographyTag.P,[TypographyVariant.TINY]:TypographyTag.P,[TypographyVariant.MINI]:TypographyTag.P};function typographyFactory(variant,tag=TypographyTag.P){const defaultTag=TypographyContract[variant]||tag;return props=>jsx(TypographyBuilder,{tag:defaultTag,className:typographyVariantClass[variant],props:props})}function Typography(props){const TargetTypo=typographyFactory(props.variant||TypographyVariant.BASE,props.tag);return jsx(TargetTypo,{...props})}Typography.Giant=typographyFactory(TypographyVariant.GIANT);Typography.Jumbo=typographyFactory(TypographyVariant.JUMBO);Typography.Large=typographyFactory(TypographyVariant.LARGE);Typography.Medium=typographyFactory(TypographyVariant.MEDIUM);Typography.Moderate=typographyFactory(TypographyVariant.MODERATE);Typography.Base=typographyFactory(TypographyVariant.BASE);Typography.Petite=typographyFactory(TypographyVariant.PETITE);Typography.Micro=typographyFactory(TypographyVariant.MICRO);Typography.Tiny=typographyFactory(TypographyVariant.TINY);Typography.Mini=typographyFactory(TypographyVariant.MINI);
export { Typography as Typo, Typography };