@designbasekorea/ui 0.5.2 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -48,11 +48,8 @@ function App() {
48
48
  클릭하세요
49
49
  </Button>
50
50
 
51
- <Card>
52
- <Card.Header>카드 제목</Card.Header>
53
- <Card.Body>
54
- <Input placeholder="이름을 입력하세요" />
55
- </Card.Body>
51
+ <Card title="카드 제목" description="카드 설명입니다.">
52
+ <Input placeholder="이름을 입력하세요" />
56
53
  </Card>
57
54
 
58
55
  <Accordion
@@ -173,7 +170,7 @@ export default App;
173
170
  ```tsx
174
171
  import { Button } from '@designbasekorea/ui';
175
172
 
176
- <Button variant="primary" size="l" onClick={() => console.log('클릭!')}>
173
+ <Button variant="primary" size="l" onPress={() => console.log('클릭!')}>
177
174
  Primary 버튼
178
175
  </Button>
179
176
 
@@ -191,11 +188,12 @@ import { Button } from '@designbasekorea/ui';
191
188
  - `size`: 's' | 'm' | 'l'
192
189
  - `fullWidth`: boolean
193
190
  - `disabled`: boolean
194
- - `onClick`: () => void
191
+ - `onPress`: () => void
195
192
 
196
193
  ### Input
197
194
 
198
195
  ```tsx
196
+ import { CloseIcon, SearchIcon } from '@designbasekorea/icons';
199
197
  import { Input } from '@designbasekorea/ui';
200
198
 
201
199
  <Input
@@ -207,12 +205,13 @@ import { Input } from '@designbasekorea/ui';
207
205
  <Input
208
206
  type="email"
209
207
  label="이메일"
210
- error="올바른 이메일을 입력하세요"
208
+ error
209
+ errorMessage="올바른 이메일을 입력하세요"
211
210
  />
212
211
 
213
212
  <Input
214
- prefix={<SearchIcon />}
215
- suffix={<ClearIcon onClick={clearInput} />}
213
+ startIcon={SearchIcon}
214
+ endIcon={CloseIcon}
216
215
  />
217
216
  ```
218
217
 
@@ -220,10 +219,11 @@ import { Input } from '@designbasekorea/ui';
220
219
  - `type`: 'text' | 'email' | 'password' | 'number' | ...
221
220
  - `label`: string
222
221
  - `placeholder`: string
223
- - `error`: string
222
+ - `error`: boolean
223
+ - `errorMessage`: string
224
224
  - `disabled`: boolean
225
- - `prefix`: ReactNode
226
- - `suffix`: ReactNode
225
+ - `startIcon`: React.ComponentType<IconProps>
226
+ - `endIcon`: React.ComponentType<IconProps>
227
227
 
228
228
  ### AnimationBackground
229
229
 
@@ -271,30 +271,31 @@ import { AnimationBackground } from '@designbasekorea/ui';
271
271
  ```tsx
272
272
  import { Card } from '@designbasekorea/ui';
273
273
 
274
- <Card>
275
- <Card.Header>
276
- <h2>카드 제목</h2>
277
- </Card.Header>
278
- <Card.Body>
279
- <p>카드 내용입니다.</p>
280
- </Card.Body>
281
- <Card.Footer>
282
- <Button>확인</Button>
283
- </Card.Footer>
274
+ <Card
275
+ title="카드 제목"
276
+ description="카드 내용입니다."
277
+ actions={[
278
+ { label: '취소', variant: 'secondary' },
279
+ { label: '확인', variant: 'primary' }
280
+ ]}
281
+ />
282
+
283
+ <Card image={{ src: '/image.jpg', alt: '썸네일' }} layout="horizontal">
284
+ <p>커스텀 콘텐츠</p>
284
285
  </Card>
285
286
  ```
286
287
 
287
288
  ### Modal
288
289
 
289
290
  ```tsx
290
- import { Modal } from '@designbasekorea/ui';
291
+ import { Button, Modal, ModalBody, ModalFooter } from '@designbasekorea/ui';
291
292
 
292
293
  function MyComponent() {
293
294
  const [isOpen, setIsOpen] = useState(false);
294
295
 
295
296
  return (
296
297
  <>
297
- <Button onClick={() => setIsOpen(true)}>
298
+ <Button onPress={() => setIsOpen(true)}>
298
299
  모달 열기
299
300
  </Button>
300
301
 
@@ -303,12 +304,13 @@ function MyComponent() {
303
304
  onClose={() => setIsOpen(false)}
304
305
  title="모달 제목"
305
306
  >
306
- <p>모달 내용입니다.</p>
307
-
308
- <Modal.Footer>
309
- <Button onClick={() => setIsOpen(false)}>닫기</Button>
307
+ <ModalBody>
308
+ <p>모달 내용입니다.</p>
309
+ </ModalBody>
310
+ <ModalFooter>
311
+ <Button onPress={() => setIsOpen(false)}>닫기</Button>
310
312
  <Button variant="primary">확인</Button>
311
- </Modal.Footer>
313
+ </ModalFooter>
312
314
  </Modal>
313
315
  </>
314
316
  );
@@ -320,11 +322,11 @@ function MyComponent() {
320
322
  ```tsx
321
323
  import { Accordion } from '@designbasekorea/ui';
322
324
 
323
- <Accordion
324
- items={[
325
- { id: 'item-1', title: '제목 1', content: '내용 1' }
326
- ]}
327
- />
325
+ <Accordion
326
+ items={[
327
+ { id: 'item-1', title: '제목 1', content: '내용 1' }
328
+ ]}
329
+ />
328
330
  ```
329
331
 
330
332
  ### Toast
@@ -514,4 +516,3 @@ import { Button } from '@designbasekorea/ui';
514
516
  ## 📄 라이선스
515
517
 
516
518
  MIT
517
-