-
Notifications
You must be signed in to change notification settings - Fork 1
✨ feat: Button Component 구현 #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
601f427
✨ feat: Button Component 생성
Moon-ju-young afa3f21
✨ feat: Props type 추가
Moon-ju-young dad4ac5
✨ feat: children 및 기본 props 추가 / 기본 형태 구성
Moon-ju-young e888edc
✨ feat: className prop 추가 및 적용
Moon-ju-young 5505cf0
🔥 remove: .gitkeep 파일 삭제
Moon-ju-young 90c6e5f
✨ feat: soild prop 추가 및 적용
Moon-ju-young 369f939
🎨 style: disabled 스타일 추가
Moon-ju-young ab987c5
Merge branch 'develop' into feat/button
Moon-ju-young bbbbf81
🎨 style: 공통 스타일 추가
Moon-ju-young 45f4e3f
✨ feat: size prop 추가 및 적용
Moon-ju-young 4dc1239
🎨 style: --color-primary 변수 추가
Moon-ju-young 6b846c0
🐛 fix: red-40 > primary로 색상 변경
Moon-ju-young c75764c
✨ feat: type prop 기본값 추가
Moon-ju-young File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import type { ButtonHTMLAttributes } from 'react'; | ||
|
|
||
| interface Props extends ButtonHTMLAttributes<HTMLButtonElement> { | ||
| solid?: boolean; | ||
| size?: 'large' | 'medium' | 'small'; | ||
| } | ||
|
|
||
| export default function Button({ | ||
| solid = true, | ||
| size = 'large', | ||
| className = '', | ||
| children, | ||
| ...props | ||
| }: Props) { | ||
| return ( | ||
| <button | ||
Moon-ju-young marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| className={`rounded-md disabled:border-none disabled:bg-gray-40 disabled:text-white ${solid ? 'bg-primary text-white' : 'border border-primary bg-white text-primary'} ${size === 'large' ? 'h-48 text-body1 font-bold' : size === 'medium' ? 'h-37 text-body2 font-bold' : 'h-32 text-caption font-regular'} ${className}`} | ||
| {...props} | ||
| > | ||
| {children} | ||
| </button> | ||
| ); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.