From 2d07c9bfa57aaf3e6b98089e01cac2bdd70b3c51 Mon Sep 17 00:00:00 2001 From: Eunseo Sim <55528304+simeunseo@users.noreply.github.com> Date: Sun, 2 Jun 2024 03:16:37 +0900 Subject: [PATCH 01/10] =?UTF-8?q?feat:=20Tag=20=EA=B8=B0=EB=B3=B8=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=ED=8B=80=20=EC=A0=95?= =?UTF-8?q?=EC=9D=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/Tag/Tag.tsx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 packages/ui/Tag/Tag.tsx diff --git a/packages/ui/Tag/Tag.tsx b/packages/ui/Tag/Tag.tsx new file mode 100644 index 0000000..b8a5164 --- /dev/null +++ b/packages/ui/Tag/Tag.tsx @@ -0,0 +1,21 @@ +import * as S from "./style.css"; + +interface TagProps { + children?: React.ReactNode; + size?: "sm" | "md" | "lg"; + shape?: "rect" | "pill"; + variant?: "default" | "primary" | "secondary"; + type?: "solid" | "line"; +} + +function Tag({ + children, + size = "sm", + shape = "rect", + variant = "default", + type = "solid", +}: TagProps) { + return
{children}
; +} + +export default Tag; From e1db3d9ffe1e420d4d949b4a059b817a85383448 Mon Sep 17 00:00:00 2001 From: Eunseo Sim <55528304+simeunseo@users.noreply.github.com> Date: Sun, 2 Jun 2024 03:44:46 +0900 Subject: [PATCH 02/10] =?UTF-8?q?feat:=20style=20=EC=A0=95=EC=9D=98=20?= =?UTF-8?q?=EB=B0=8F=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/docs/src/App.tsx | 277 ++++++++++++++++++++++++++++++++--- packages/ui/Tag/Tag.tsx | 4 +- packages/ui/Tag/constants.ts | 39 +++++ packages/ui/Tag/index.ts | 1 + packages/ui/Tag/style.css.ts | 27 ++++ packages/ui/Tag/types.ts | 9 ++ packages/ui/Tag/utils.ts | 23 +++ 7 files changed, 356 insertions(+), 24 deletions(-) create mode 100644 packages/ui/Tag/constants.ts create mode 100644 packages/ui/Tag/index.ts create mode 100644 packages/ui/Tag/style.css.ts create mode 100644 packages/ui/Tag/types.ts create mode 100644 packages/ui/Tag/utils.ts diff --git a/apps/docs/src/App.tsx b/apps/docs/src/App.tsx index 99d71ba..0ca161f 100644 --- a/apps/docs/src/App.tsx +++ b/apps/docs/src/App.tsx @@ -1,50 +1,281 @@ -import { Test } from '@sopt-makers/ui'; -import './App.css'; -import { useState, ChangeEvent } from 'react'; -import TextField from '../../../packages/ui/Input/TextField'; -import TextArea from '../../../packages/ui/Input/TextArea'; -import SearchField from '../../../packages/ui/Input/SearchField'; +import "./App.css"; + +import { ChangeEvent, useState } from "react"; + +import SearchField from "../../../packages/ui/Input/SearchField"; +import Tag from "../../../packages/ui/Tag/Tag"; +import { Test } from "@sopt-makers/ui"; +import TextArea from "../../../packages/ui/Input/TextArea"; +import TextField from "../../../packages/ui/Input/TextField"; function App() { - const [input, setInput] = useState(''); - const [textarea, setTextarea] = useState(''); - const [search, setSearch] = useState(''); + const [input, setInput] = useState(""); + const [textarea, setTextarea] = useState(""); + const [search, setSearch] = useState(""); const handleInputChange = (e: ChangeEvent) => { setInput(e.target.value); - } + }; const inputValidation = (input: string) => { if (input && input.length > 10) return true; return false; - } + }; const handleTextareaChange = (e: ChangeEvent) => { setTextarea(e.target.value); - } + }; const textareaValidation = (input: string) => { if (input && input.length > 10) return true; return false; - } + }; - const handleTextareaSubmit = () => { console.log(textarea) } + const handleTextareaSubmit = () => { + console.log(textarea); + }; const handleSearchChange = (e: ChangeEvent) => { setSearch(e.target.value); - } + }; - const handleSearchSubmit = () => { console.log(search) } + const handleSearchSubmit = () => { + console.log(search); + }; - const handleSearchReset = () => { setSearch('') } + const handleSearchReset = () => { + setSearch(""); + }; return ( - <> - - placeholder="Placeholder..." required labelText="Label" descriptionText="description" validationFn={inputValidation} value={input} onChange={handleInputChange} /> -