0.1.1 โข Published 2 years ago
๐ react-sook-style ๐ซง
Install
npm i react-sook-style
Quick Start
import { SookButton, SookCard, SookFlex, SookGrid } from "react-sook-style";
API
Button
| Prop | Type | Default | Description |
|---|
| children | string,React.ReactNode | | ๋ฒํผ ํ
์คํธ ๋๋ ์์ด์ฝ |
| theme | ThemeProps | primary | ์ปฌ๋ฌํ
๋ง์ค์ |
| size | "xs","sm" , "md" , "lg" | md | ๋ฒํผ ์ฌ์ด์ฆ |
| type | "button" ,"submit" , "reset"; | button | ๋ฒํผ ํ์
|
| onClick | (e?: React.MouseEvent) => void; | | ํด๋ฆญ์ด๋ฒคํธ |
| disabled | boolean | false | ๋ฒํผ ๋นํ์ฑํ |
| customStyle | string | | ์ฌ์ฉ์ ์ง์ ์คํ์ผ |
Card
| Prop | Type | Default | Description |
|---|
| children | string,React.ReactNode | | ์นด๋ ์ปจํ
์ธ |
| size | "sm" , "md" , "lg" | md | ์นด๋ ์ฌ์ด์ฆ |
| title | string | | ์นด๋ ์ต์
๋ ํ์ดํ |
| onClick | () => void; | | ํด๋ฆญ์ด๋ฒคํธ |
| customStyle | string | | ์ฌ์ฉ์ ์ง์ ์คํ์ผ |
Flex
| Prop | Type | Default | Description |
|---|
| children | string,React.ReactNode | | ์นด๋ ์ปจํ
์ธ |
| customStyle | string | | ์ฌ์ฉ์ ์ง์ ์คํ์ผ |
| col | boolean | true | column ์ฌ๋ถ |
| row | boolean | | row ์ฌ๋ถ |
| gap | number | 12 | ๊ฐ๊ฒฉ |
| wrap | string | | ์ค ํ์ ์์ฑ |
| item | string | flex-start | ์ธ๋ก์ ๋ ฌ |
| justify | string | flex-start | ์ข์ฐ์ ๋ ฌ |
Grid
| Prop | Type | Default | Description |
|---|
| children | string,React.ReactNode | | ์นด๋ ์ปจํ
์ธ |
| customStyle | string | | ์ฌ์ฉ์ ์ง์ ์คํ์ผ |
| col | string | 1fr | ๋๋ ์ด ํ๋ ์ ์นผ๋ผ |
| row | string | 1fr | ๋๋ ํ ํ๋ ์ ์นผ๋ผ |
| gap | number | 12 | ๊ฐ๊ฒฉ |
| item | string | flex-start | ์ธ๋ก์ ๋ ฌ |
| justify | string | flex-start | ์ข์ฐ์ ๋ ฌ |
Stack
- React
- Typescript
- Style-componet