UNPKG

@tapie-kr/inspire-react

Version:

React Component Collection for INSPIRE

26 lines (23 loc) 1.6 kB
/* 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 { jsxs, jsx } from 'react/jsx-runtime'; import { base, disabled } from './styles.css.js'; import { colorVars } from '../../../lib/style/contract/color.css.js'; import { spacingVars } from '../../../lib/style/contract/component.css.js'; import { HStack } from '../../../node_modules/@cottons-kr/react-foundation/dist/index.esm.js'; import { Icon } from '../../foundations/Icon/index.js'; import { GlyphIcon } from '../../foundations/Icon/icon-set.js'; import { Typography } from '../../foundations/Typography/index.js'; import cn from '../../../_virtual/index.js'; var LabelSize=/*#__PURE__*/function(LabelSize){LabelSize["LARGE"]="large";LabelSize["MEDIUM"]="medium";LabelSize["SMALL"]="small";return LabelSize}({});function Label(props){const{isEssential,isDisabled,size="large"}=props;const isLarge=size==="large";const isMedium=size==="medium";const LabelTypo=isLarge?Typography.Petite:isMedium?Typography.Tiny:Typography.Mini;return jsxs(HStack,{fitContent:true,className:cn(base,isDisabled&&disabled),align:"center",gap:spacingVars.mini,children:[jsx(LabelTypo,{children:props.children}),jsx(Icon,{name:isEssential&&GlyphIcon.ASTERISK,size:isLarge?10:isMedium?8:6,color:isDisabled?colorVars.solid.translucent.red._30:colorVars.solid.red})]})} export { Label, LabelSize };