diff --git a/.vscode/settings.json b/.vscode/settings.json index 25fa621..415cb65 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,5 @@ { - "typescript.tsdk": "node_modules/typescript/lib" + "typescript.tsdk": "node_modules/typescript/lib", + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode" } diff --git a/apps/docs/src/App.tsx b/apps/docs/src/App.tsx index 99d71ba..ae949d4 100644 --- a/apps/docs/src/App.tsx +++ b/apps/docs/src/App.tsx @@ -1,49 +1,81 @@ -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 { 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} /> -