nextjs-framework
  • nextjs-sj-prime-base
  • Getting Started
    • Quickstart
    • Project Structure
    • Code Convention
  • 신규 프로젝트 생성 가이드
  • 라이브러리 개발 및 배포
  • # 고고컴퍼니 어드민 개발 서버 배포
  • Port 설정 방법
  • 에러 해결 방법
  • StoryBook 설명
  • COMPONENTS/UI
    • Tooltip
    • CompactIconButton
    • IconButton
    • FormAsset
    • InputField
    • Dropzone
    • Select
    • DataTable
    • TableHead
    • TableHeadDropdownMenu
    • TableCell
    • TableCellSelect
    • Tag
    • Tabs
    • Chip
    • Command
    • FilterSelect
    • FilterMultiSelect
    • FilterDate
    • DatePicker
    • Toast
  • Timer
  • Components/layout
    • page-header
    • info-card
    • search-filter
    • table-header
    • form
  • Custom Hook
    • use-form
  • use-form-file
  • use-timer
  • Util
    • validation
    • middleware.ts
  • Components/미사용
    • input-box
    • single-select
    • multi-select
    • range-date-picker
    • radio-button-group
    • checkbox-group
    • list-table
    • pagination
    • toggle
Powered by GitBook
On this page
  • 1. CommandGroup
  • Props
  • Usage
  • 2. CommandItemBase
  • Props
  • Usage
  1. COMPONENTS/UI

Command

PreviousChipNextFilterSelect

Last updated 1 month ago

1. CommandGroup

Props

Prop
Type
Default
Description

heading

boolean

-

Heading 노출 여부

headingText

string | React.ReactNode

-

Heading 텍스트

button

boolean

-

버튼 노출 여부

buttonText

string

-

버튼 텍스트

buttonClick

function

-

버튼 클릭 이벤트 핸들러

variant

'default' | 'select' | 'checkbox' | 'toggle'

-

타입

className

string

-

커스텀 스타일 적용

items

{ value: string label: string description: string

disabled: boolean

checked: boolean

selected: boolean

active: boolean }[]

-

그룹 아이템 value: 선택 값 label: 라벨 텍스트 description: 상세 설명 disabled: 비활성화 여부 checked: 체크 여부 selected: 선택 여부 active: 활성화 여부

onItemSelect

function

-

아이템 선택 이벤트 핸들러

accentColor

string

-

강조 색상

hoverColor

string

-

hover 색상

icon

React.ReactNode

-

라벨 아이콘

Usage

<CommandGroup
  heading={true}
  headingText={'Heading'}
  button={true}
  buttonText={'적용'}
  buttonClick={() => {}}
  variant={'select'}
  items={[
    {
      value: 'item01',
      label: 'Command Item',
    },
    {
      value: 'item02',
      label: 'Command Item',
    }
  ]}
  onItemSelect={() => {}}
/>

2. CommandItemBase

Props

Prop
Type
Default
Description

value

string

-

선택 값

label

string

-

라벨 텍스트

icon

React.ReactNode

-

라벨 아이콘

description

string

-

상세 설명

disabled

boolean

-

비활성화 여부

onSelect

function

-

아이템 선택 이벤트 핸들러

className

string

-

커스텀 스타일 적용

accentColor

string

-

강조 색상

hoverColor

string

-

hover 색상

Usage

<CommandItemBase
  value={'item01'}
  label={'Command Item'}
  icon={<Calendar16Regular />}  
/>