UNPKG

@tapie-kr/inspire-react

Version:

React Component Collection for INSPIRE

24 lines (21 loc) 1.48 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 { jsx } from 'react/jsx-runtime'; import { square, active } from './styles.css.js'; import { Button } from '../../atoms/Button/index.js'; import { GlyphIcon } from '../../foundations/Icon/icon-set.js'; import { Box } from '../../miscellaneous/layout/Box/index.js'; import cn from '../../../_virtual/index.js'; import { ButtonSize, ButtonVariant } from '../../atoms/Button/shared.js'; function ControlButton(props){const isPrevious=props.type==="previous";const icon=isPrevious?GlyphIcon.CHEVRON_LEFT:GlyphIcon.CHEVRON_RIGHT;const label=isPrevious?"이전":"다음";const handleOnClick=props.onClick;return jsx(Button.Default,{variant:ButtonVariant.SECONDARY,size:ButtonSize.MEDIUM,leadingIcon:isPrevious?icon:undefined,trailingIcon:!isPrevious?icon:undefined,onClick:handleOnClick,children:label})}function PageButton(props){const handleClick=props.onClick;return jsx(Square,{isActive:props.isActive,children:jsx(Button.Text,{fullWidth:true,fullHeight:true,onClick:handleClick,children:props.page})})}function Square(props){return jsx(Box,{className:cn(square,{[active]:props.isActive}),children:props.children})} export { ControlButton, PageButton, Square };