UNPKG

@tapie-kr/inspire-react

Version:

React Component Collection for INSPIRE

26 lines (23 loc) 1.27 kB
'use client'; /* 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, jsxs } from 'react/jsx-runtime'; import { base, active } from './styles.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 { Typography } from '../../foundations/Typography/index.js'; import cn from '../../../_virtual/index.js'; import { TypographyWeight } from '../../foundations/Typography/shared.js'; function Chip(props){const{leadingIcon,trailingIcon,isActive=false}=props;return jsx("button",{className:cn(base,isActive&&active),onClick:props.onClick,children:jsxs(HStack,{fitContent:true,align:"center",justify:"center",gap:spacingVars.tiny,children:[jsx(Icon,{name:leadingIcon,size:16}),jsx(Typography.Tiny,{weight:TypographyWeight.MEDIUM,children:props.children}),jsx(Icon,{name:trailingIcon,size:16})]})})} export { Chip };