Skip to content

Commit

Permalink
Feat : 모달/인풋/버튼 완성 ~~:
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeonsu00-12 committed Aug 15, 2024
1 parent dce0a9f commit 01a2efa
Show file tree
Hide file tree
Showing 13 changed files with 451 additions and 187 deletions.
49 changes: 49 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"apexcharts": "^3.52.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-modal": "^3.16.1",
"react-router-dom": "^6.26.0",
"react-scripts": "5.0.1",
"styled-components": "^6.1.12",
Expand Down Expand Up @@ -42,5 +43,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@types/react-modal": "^3.16.3"
}
}
26 changes: 26 additions & 0 deletions src/Component/Button/button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import styled from "styled-components"
import React from "react"
import { buttonSize, buttonType } from "../../Styles/button";
import { ButtonStyleProps, ButtonProps } from "../../constants/interface";

const ButtonStyle = styled.button<ButtonStyleProps>`
border-radius: 10px;
${(props) => buttonSize[props.size]}
${(props) => buttonType[props.colorType]?.[props.state]}
`

const Button = ({onClick, children, ...styleprops}: ButtonProps) => {
return (
<>
<ButtonStyle {...styleprops} onClick={onClick}>
{children}
</ButtonStyle>
</>
)
}

export default Button;

// 버튼 사용 예시
{/* <Button state="normal" colorType="main" size="small">버튼</Button> */}
Loading

0 comments on commit 01a2efa

Please sign in to comment.