-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: FloatButton 컴포넌트 구현 #21
Open
1223v
wants to merge
7
commits into
woorifisa-service-dev-4th:dev
Choose a base branch
from
1223v:main
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1326fc9
feat: FloatButton 컴포넌트 구현
1223v d88d7bd
fix: FC 방식 함수표현식으로 변경
1223v c0286d1
fix: FloatButton 포지션 수정
1223v 8b11b30
Fix: ssr 방식 배포 수정
1223v 3da2539
Merge remote-tracking branch 'upstream/dev' into HEAD
1223v 6e351cb
Fix: vite 빌드 파일 수정
1223v e5038c0
Fix: 모듈 병합 빌드
1223v 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,7 +1,17 @@ | ||
import "./App.css"; | ||
import FloatButton from "./libs/floatbutton/FloatButton"; | ||
|
||
function App() { | ||
return <div></div>; | ||
return ( | ||
<div> | ||
<FloatButton | ||
icon="❓" | ||
position="center" | ||
size="large" | ||
onClick={() => alert("Help clicked!")} | ||
/> | ||
</div> | ||
); | ||
} | ||
|
||
export default App; |
This file contains 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,5 @@ | ||
// global.d.ts | ||
declare module "*.module.css" { | ||
const classes: { [key: string]: string }; | ||
export default classes; | ||
} |
This file contains 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 |
---|---|---|
@@ -1,69 +1,4 @@ | ||
:root { | ||
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; | ||
line-height: 1.5; | ||
font-weight: 400; | ||
|
||
color-scheme: light dark; | ||
color: rgba(255, 255, 255, 0.87); | ||
background-color: #242424; | ||
|
||
font-synthesis: none; | ||
text-rendering: optimizeLegibility; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
|
||
a { | ||
font-weight: 500; | ||
color: #646cff; | ||
text-decoration: inherit; | ||
} | ||
a:hover { | ||
color: #535bf2; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
display: flex; | ||
place-items: center; | ||
min-width: 320px; | ||
min-height: 100vh; | ||
} | ||
|
||
h1 { | ||
font-size: 3.2em; | ||
line-height: 1.1; | ||
} | ||
|
||
button { | ||
border-radius: 8px; | ||
border: 1px solid transparent; | ||
padding: 0.5em 1.2em; | ||
margin: 0.3em; | ||
font-size: 1em; | ||
font-weight: 500; | ||
font-family: inherit; | ||
background-color: #1a1a1a; | ||
cursor: pointer; | ||
transition: border-color 0.25s; | ||
} | ||
button:hover { | ||
border-color: red; | ||
} | ||
button:focus, | ||
button:focus-visible { | ||
outline: 4px auto -webkit-focus-ring-color; | ||
} | ||
|
||
@media (prefers-color-scheme: light) { | ||
:root { | ||
color: #213547; | ||
background-color: #ffffff; | ||
} | ||
a:hover { | ||
color: #747bff; | ||
} | ||
button { | ||
background-color: #f9f9f9; | ||
} | ||
} | ||
@import "./styles/colors.css"; | ||
@import "./styles/spacing.css"; | ||
@import "./styles/typography.css"; | ||
@import "./libs/floatbutton/FloatButton.module.css"; |
This file contains 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,8 @@ | ||
import "./styles/colors.css"; | ||
import "./styles/spacing.css"; | ||
import "./styles/typography.css"; | ||
|
||
export { default as FloatButton } from "./libs/floatbutton/FloatButton"; | ||
export { default as Divider } from "./libs/divider/divider"; | ||
export { default as Checkbox } from "./libs/checkbox/Checkbox"; | ||
export { default as Button } from "./libs/button/Button"; |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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,90 @@ | ||
.floatButton { | ||
position: fixed; | ||
bottom: 16px; | ||
right: 16px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
border-radius: 50%; | ||
border: none; | ||
cursor: pointer; | ||
font-family: var(--font-family-base); | ||
font-size: var(--font-size-base); | ||
transition: background-color 0.3s ease, box-shadow 0.3s ease, | ||
transform 0.2s ease; | ||
box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2), 0 4px 6px rgba(0, 0, 0, 0.15); | ||
overflow: hidden; | ||
} | ||
|
||
.floatButton.left { | ||
left: 16px; | ||
right: auto; | ||
} | ||
|
||
.floatButton.right { | ||
right: 16px; | ||
left: auto; | ||
} | ||
|
||
.floatButton.center { | ||
left: 50%; | ||
bottom: 16px; | ||
} | ||
|
||
.floatButton.small { | ||
width: 40px; | ||
height: 40px; | ||
font-size: var(--font-size-small); | ||
} | ||
|
||
.floatButton.medium { | ||
width: 50px; | ||
height: 50px; | ||
font-size: var(--font-size-base); | ||
} | ||
|
||
.floatButton.large { | ||
width: 60px; | ||
height: 60px; | ||
font-size: var(--font-size-large); | ||
} | ||
|
||
.floatButton.circle { | ||
border-radius: 50%; | ||
} | ||
|
||
.floatButton.rounded { | ||
border-radius: 12px; | ||
} | ||
|
||
.floatButton.default { | ||
background-color: var(--color-primary); | ||
color: var(--color-light); | ||
box-shadow: 0 4px 6px var(--color-shadow-light); | ||
} | ||
|
||
.floatButton.default:hover { | ||
background-color: var(--color-primary-hover); | ||
box-shadow: 0 6px 10px var(--color-shadow-dark); | ||
transform: scale(1.1); | ||
} | ||
|
||
.floatButton:active { | ||
transform: scale(0.95); | ||
background-color: var(--color-primary-active); | ||
box-shadow: 0 2px 4px var(--color-shadow-dark); | ||
} | ||
|
||
.floatButton.custom { | ||
box-shadow: 0 4px 6px var(--color-shadow-light); | ||
} | ||
|
||
.floatButton.custom:hover { | ||
transform: scale(1.1); | ||
box-shadow: 0 6px 10px var(--color-shadow-dark); | ||
} | ||
|
||
.floatButton.custom:active { | ||
transform: scale(0.95); | ||
box-shadow: 0 2px 4px var(--color-shadow-dark); | ||
} |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
음 저희 글자 컬러색이 현재 검은색으로 자동 박혀있는데 저희 디폴트 컬러값이 파란색이니까 하얀색으로 일단 넣어주는거 어떨까요?
그럼 배경색이 너무 밝을때 안보이지 않을까? 하실 수 있지만 지금 현식님은 배경색 디폴트 파란색 색상 외에 자유롭게 설정할 수 있도록 하셨는데 추후 디자이너 분과 함께이면
배경색을 아예 열어둘지, 어느정도 테마 색상을 갖고가서 이 안에서 설정할 수 있도록 할지 등 논의에 따라 배경색 관련 코드를 수정할 수도 있기에
일단 디폴트 색상에 맞춰서 글씨 색을 하얀색으로 박고 가는게 나을거 같다는 생각입니다!