-
Notifications
You must be signed in to change notification settings - Fork 1
Feat(client): 온보딩 페이지 레이아웃 #56
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
Changes from 7 commits
5bd7577
404ae5b
624cc17
9a70e01
63d6ffe
af80d54
eddface
e40be82
1969490
8cb98d6
99a5139
70d222e
dc94e2b
ab4b776
ffd5261
5c436c3
0b8eefb
5250c8d
3bb0c7f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,16 @@ | ||
| import onBoardingBg from '../../assets/onBoarding/background/onBoardingBg.svg'; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 필요하면 assets도 절대 경로에 추가해도 될 것 같은데 어떻게 생각하시나요! |
||
| import Header from './components/header/Header'; | ||
| import MainCard from './components/funnel/MainCard'; | ||
| const OnBoarding = () => { | ||
| return <div>OnBoarding</div>; | ||
| return ( | ||
| <div | ||
| className={`relative flex h-screen w-screen items-center justify-center bg-cover bg-center bg-no-repeat`} | ||
| style={{ backgroundImage: `url(${onBoardingBg})` }} | ||
| > | ||
| <Header /> | ||
| <MainCard /> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default OnBoarding; | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,51 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| import avatar1 from '../../../../assets/onBoarding/icons/chippi_morning.svg'; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| import avatar2 from '../../../../assets/onBoarding/icons/chippi_night.svg'; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| import avatar3 from '../../../../assets/onBoarding/icons/chippi_bell.svg'; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| import { cva } from 'class-variance-authority'; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| interface AlarmBoxProps { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| select: 1 | 2 | 3; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| isDisabled: boolean; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| onClick?: () => void; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| const AlarmsType = [ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { img: avatar1, title: '아침형 치삐', time: '오전 9시' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { img: avatar2, title: '저녁형 치삐', time: '오후 8시' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { img: avatar3, title: '사용자 설정' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| const boxStyle = cva( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 'flex h-[22.4rem] w-[18rem] flex-col items-center rounded-[1.2rem] px-[3.9rem] pb-[2.6rem] pt-[3.6rem] cursor-pointer transition', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| variants: { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| disabled: { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| true: 'border-main400 bg-main100 border', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| false: 'bg-white border border-transparent hover:border-main300', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| defaultVariants: { disabled: false }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+11
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion disabled 변형에서도 커서/클릭이 유지됨 베이스 클래스에 -const boxStyle = cva(
- 'flex h-[22.4rem] w-[18rem] flex-col items-center rounded-[1.2rem] px-[3.9rem] pb-[2.6rem] pt-[3.6rem] cursor-pointer transition',
+const boxStyle = cva(
+ 'flex h-[22.4rem] w-[18rem] flex-col items-center rounded-[1.2rem] px-[3.9rem] pb-[2.6rem] pt-[3.6rem] transition',
{
variants: {
disabled: {
- true: 'border-main400 bg-main100 border',
- false: 'bg-white border border-transparent hover:border-main300',
+ true: 'border-main400 bg-main100 border cursor-not-allowed pointer-events-none',
+ false: 'bg-white border border-transparent hover:border-main300 cursor-pointer',
},
},
defaultVariants: { disabled: false },
}
);📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| const AlarmBox = ({ select, isDisabled, onClick }: AlarmBoxProps) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <div className={boxStyle({ disabled: isDisabled })} onClick={onClick}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <img src={AlarmsType[select - 1].img} alt="chippi" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <p | ||||||||||||||||||||||||||||||||||||||||||||||||||
| className={`sub3-sb ${ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| isDisabled ? 'text-main500' : 'text-font-black-1' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }`} | ||||||||||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||||||||||
| {AlarmsType[select - 1].title} | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </p> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| {select <= 2 && ( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <p className="caption2-m text-font-gray-3"> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| {AlarmsType[select - 1].time} | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </p> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| )} | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+31
to
+76
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion 클릭 가능한 div → button으로 전환하여 키보드/스크린리더 접근성 보장 현재 div+onClick은 키보드 포커스/Space/Enter 동작, 아래 diff 적용 제안: -const AlarmBox = ({ select, isDisabled, onClick }: AlarmBoxProps) => {
+const AlarmBox = ({ select, isDisabled, onClick }: AlarmBoxProps) => {
return (
- <div className={boxStyle({ disabled: isDisabled })} onClick={onClick}>
- <img src={AlarmsType[select - 1].img} alt="chippi" />
+ <button
+ type="button"
+ className={boxStyle({ disabled: isDisabled })}
+ onClick={onClick}
+ disabled={isDisabled}
+ >
+ <img src={AlarmsType[select - 1].img} alt={AlarmsType[select - 1].title} loading="lazy" />
<p
className={`sub3-sb ${
isDisabled ? 'text-main500' : 'text-font-black-1'
}`}
>
{AlarmsType[select - 1].title}
</p>
{select <= 2 && (
<p className="caption2-m text-font-gray-3">
{AlarmsType[select - 1].time}
</p>
)}
- </div>
+ </button>
);
}; |
||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| export default AlarmBox; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import { useState } from 'react'; | ||
| import dotori from '../../../../assets/onBoarding/icons/dotori.svg'; | ||
| import AlarmBox from './AlarmBox'; | ||
|
|
||
| const AlarmStep = () => { | ||
| const [selected, setSelected] = useState<1 | 2 | 3>(1); // 기본값은 1번 선택 | ||
|
|
||
| return ( | ||
| <div className="flex flex-col items-center justify-between"> | ||
| <img src={dotori} className="mb-[1.2rem]" alt="dotori" /> | ||
| <p className="head2 text-font-black-1"> | ||
| 도토리 찾으러 갈 시간을 정해볼까요? | ||
| </p> | ||
| <p className="body2-m text-font-gray-3 mb-[4.3rem] mt-[0.8rem] text-center"> | ||
| 매일 지정한 시간에 저장한 북마크를 리마인드해드려요 | ||
| </p> | ||
|
|
||
| <div className="mb-[2rem] flex w-full items-center justify-center gap-[1.4rem]"> | ||
| {[1, 2, 3].map((n) => ( | ||
| <AlarmBox | ||
| key={n} | ||
| select={n as 1 | 2 | 3} | ||
| isDisabled={selected === n} | ||
| onClick={() => setSelected(n as 1 | 2 | 3)} | ||
| /> | ||
| ))} | ||
| </div> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default AlarmStep; |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 전체적으로 현재는 |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,92 @@ | ||||||||||||||||||||||||||||||||||||||||||
| import { Progress, Button } from '@pinback/design-system/ui'; | ||||||||||||||||||||||||||||||||||||||||||
| import { useState } from 'react'; | ||||||||||||||||||||||||||||||||||||||||||
| import { motion, AnimatePresence } from 'framer-motion'; | ||||||||||||||||||||||||||||||||||||||||||
| import StoryStep from './StoryStep'; | ||||||||||||||||||||||||||||||||||||||||||
| import AlarmStep from './AlarmStep'; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| const stepProgress = [{ progress: 30 }, { progress: 60 }, { progress: 100 }]; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| const variants = { | ||||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. slideIn~Out 느낌으로 네이밍 구체화 했습니당 |
||||||||||||||||||||||||||||||||||||||||||
| enter: (direction: number) => ({ | ||||||||||||||||||||||||||||||||||||||||||
| x: direction > 0 ? 200 : -200, | ||||||||||||||||||||||||||||||||||||||||||
| opacity: 0, | ||||||||||||||||||||||||||||||||||||||||||
| }), | ||||||||||||||||||||||||||||||||||||||||||
| center: { x: 0, opacity: 1 }, | ||||||||||||||||||||||||||||||||||||||||||
| exit: (direction: number) => ({ | ||||||||||||||||||||||||||||||||||||||||||
| x: direction > 0 ? -200 : 200, | ||||||||||||||||||||||||||||||||||||||||||
| opacity: 0, | ||||||||||||||||||||||||||||||||||||||||||
| }), | ||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| const MainCard = () => { | ||||||||||||||||||||||||||||||||||||||||||
| const [step, setStep] = useState(0); | ||||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 제 개인적인 생각으로는 예를 들어 <Button
variant="primary"
size="medium"
isDisabled={step === 6}
className="ml-auto w-[4.8rem]"
onClick={nextStep}
>이런 코드도 재림님은 이 부분에 대해서 어떻게 생각하시나요!
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 안그래도 구현할때, step 몇이 어떤단계인지 저도 헷갈렸었는데,, 너무 좋은 방향인 것 같아요!! |
||||||||||||||||||||||||||||||||||||||||||
| const [direction, setDirection] = useState(0); | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| const nextStep = () => { | ||||||||||||||||||||||||||||||||||||||||||
| if (step < 3) { | ||||||||||||||||||||||||||||||||||||||||||
| // 0,1,2 → story, 3 → alarm | ||||||||||||||||||||||||||||||||||||||||||
| setDirection(1); | ||||||||||||||||||||||||||||||||||||||||||
| setStep((prev) => prev + 1); | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| const prevStep = () => { | ||||||||||||||||||||||||||||||||||||||||||
| if (step > 0) { | ||||||||||||||||||||||||||||||||||||||||||
| setDirection(-1); | ||||||||||||||||||||||||||||||||||||||||||
| setStep((prev) => prev - 1); | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+65
to
+82
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. step string 관련 의논을 해보고 필요하다면 로직 관련은 커스텀 훅으로 분리하는 것도 좋을 것 같아요! |
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||||
| <div className="bg-white-bg flex h-[54.8rem] w-[63.2rem] flex-col items-center justify-between overflow-hidden rounded-[2.4rem] pt-[3.2rem]"> | ||||||||||||||||||||||||||||||||||||||||||
| {/* ProgressBar는 story 단계에서만 보여줌 */} | ||||||||||||||||||||||||||||||||||||||||||
| {step < 3 && ( | ||||||||||||||||||||||||||||||||||||||||||
| <Progress | ||||||||||||||||||||||||||||||||||||||||||
| value={stepProgress[step].progress} | ||||||||||||||||||||||||||||||||||||||||||
| variant="profile" | ||||||||||||||||||||||||||||||||||||||||||
| className="w-[30%]" | ||||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. px/rem로 박으면 너무 쪼그라들거나 작아보이는 거 같아서 %로 하긴했는데, 이부분은 QA때 디바이스 별로 확인하는 걸로 하고 실제 width로 다시 지정해두겠습니당 :) |
||||||||||||||||||||||||||||||||||||||||||
| /> | ||||||||||||||||||||||||||||||||||||||||||
| )} | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+86
to
+92
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 해당 progress bar는
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 아 해당 mainCard 는 패딩 레이아웃 다 통일해둔 흰박스레이아웃 안에 안에 내용물만 슬라이딩 하면서 바뀌게 되는데요!
다음처럼 설계했었습니다! 좋은 의견 있다면 말씀주세요! |
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <div className="relative flex h-full w-full items-center justify-center"> | ||||||||||||||||||||||||||||||||||||||||||
| <AnimatePresence custom={direction} mode="wait"> | ||||||||||||||||||||||||||||||||||||||||||
| <motion.div | ||||||||||||||||||||||||||||||||||||||||||
| key={step} | ||||||||||||||||||||||||||||||||||||||||||
| custom={direction} | ||||||||||||||||||||||||||||||||||||||||||
| variants={variants} | ||||||||||||||||||||||||||||||||||||||||||
| initial="enter" | ||||||||||||||||||||||||||||||||||||||||||
| animate="center" | ||||||||||||||||||||||||||||||||||||||||||
| exit="exit" | ||||||||||||||||||||||||||||||||||||||||||
| transition={{ duration: 0.4 }} | ||||||||||||||||||||||||||||||||||||||||||
| className="absolute flex flex-col items-center" | ||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||
| {step < 3 ? <StoryStep step={step as 0 | 1 | 2} /> : <AlarmStep />} | ||||||||||||||||||||||||||||||||||||||||||
| </motion.div> | ||||||||||||||||||||||||||||||||||||||||||
| </AnimatePresence> | ||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <div className="mb-[4.8rem] mt-[1.2rem] flex w-full justify-between px-[3.2rem]"> | ||||||||||||||||||||||||||||||||||||||||||
| <Button | ||||||||||||||||||||||||||||||||||||||||||
| variant="primary" | ||||||||||||||||||||||||||||||||||||||||||
| size="medium" | ||||||||||||||||||||||||||||||||||||||||||
| isDisabled={step === 0} | ||||||||||||||||||||||||||||||||||||||||||
| className="w-[4.8rem]" | ||||||||||||||||||||||||||||||||||||||||||
| onClick={prevStep} | ||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||
| 이전 | ||||||||||||||||||||||||||||||||||||||||||
| </Button> | ||||||||||||||||||||||||||||||||||||||||||
| <Button | ||||||||||||||||||||||||||||||||||||||||||
| variant="primary" | ||||||||||||||||||||||||||||||||||||||||||
| size="medium" | ||||||||||||||||||||||||||||||||||||||||||
| isDisabled={step === 3} // 마지막은 alarmStep | ||||||||||||||||||||||||||||||||||||||||||
| className="w-[4.8rem]" | ||||||||||||||||||||||||||||||||||||||||||
| onClick={nextStep} | ||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||
| 다음 | ||||||||||||||||||||||||||||||||||||||||||
| </Button> | ||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+123
to
+132
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion 다음 버튼 비활성화 조건 버그(step === 6) 수정 step은 0–5 범위로 운용되므로 현재 조건은 영원히 false입니다. 의미 없는 prop 전달이므로 제거하거나 전환 중(isAnimating) 비활성화로 교체하세요. 전환 중 비활성화로 교체 예: - isDisabled={step === 6}
+ isDisabled={isAnimating}단순 제거 예: - isDisabled={step === 6}
+ // isDisabled 제거📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이부분 한번 확인해주세요-! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jjangminii 네, 확인했습니다! CodeRabbit이 지적한 버그가 맞습니다. 문제점:
수정 방안:
<Button
variant="primary"
size="medium"
className="ml-auto w-[4.8rem]"
onClick={nextStep}
>
다음
</Button>
// 상태 추가
const [isAnimating, setIsAnimating] = useState(false);
// 애니메이션 처리
const nextStep = () => {
setIsAnimating(true);
// ... 기존 로직
setTimeout(() => setIsAnimating(false), 400); // 애니메이션 duration과 맞춤
};
// 버튼에서 사용
<Button
variant="primary"
size="medium"
isDisabled={isAnimating}
className="ml-auto w-[4.8rem]"
onClick={nextStep}
>
다음
</Button>어떤 방향으로 수정하실 건가요? |
||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| export default MainCard; | ||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| import story1 from '../../../../assets/onBoarding/story/story1.svg'; | ||
| import story2 from '../../../../assets/onBoarding/story/story2.svg'; | ||
| import story3 from '../../../../assets/onBoarding/story/story3.svg'; | ||
| interface StoryStepProps { | ||
| step: 0 | 1 | 2; | ||
| } | ||
| const steps = [ | ||
| { | ||
| img: story1, | ||
| text: ( | ||
| <> | ||
| 깊고 신비한 숲에는 지식 나무가 있어요. <br /> | ||
| 지식 나무는 사람들의 잊힌 기록을 도토리 씨앗으로 바꾼답니다. | ||
| </> | ||
| ), | ||
| progress: 30, | ||
| }, | ||
| { | ||
| img: story2, | ||
| text: ( | ||
| <> | ||
| 당신이 정보를 읽고 활용하는 것을 양분삼아, <br /> | ||
| 지식 나무에는 맛있는 도토리 열매가 열려요. | ||
| </> | ||
| ), | ||
| progress: 60, | ||
| }, | ||
| { | ||
| img: story3, | ||
| text: ( | ||
| <> | ||
| 다람쥐 치삐는 정보를 활용하지 못해 아직 도토리 만개 숲에 도착하지 못하고 | ||
| 있어요. | ||
| <br /> | ||
| 도토리를 모아 치삐가 숲에 닿을 수 있도록 도와주세요! | ||
| </> | ||
| ), | ||
| progress: 100, | ||
| }, | ||
| ]; | ||
|
|
||
| const StoryStep = ({ step }: StoryStepProps) => { | ||
| return ( | ||
| <div className="flex flex-col items-center"> | ||
| <img | ||
| src={steps[step].img} | ||
| className="mb-[1.6rem] mt-[2.4rem] w-[31.2rem]" | ||
| alt="onboarding" | ||
| /> | ||
| <p className="sub4-sb text-center text-black">{steps[step].text}</p> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default StoryStep; |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,13 @@ | ||||||||||||||||||||||||||||||
| import HeaderLogo from '../../../../assets/onBoarding/icons/header_logo.svg'; | ||||||||||||||||||||||||||||||
| const Header = () => { | ||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||
| <div | ||||||||||||||||||||||||||||||
| className="z-5 absolute top-0 flex w-full justify-items-start px-[8rem] py-[2.5rem]" | ||||||||||||||||||||||||||||||
| onClick={() => window.location.reload()} | ||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||
| <img src={HeaderLogo} alt="header logo" /> | ||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion 클릭 가능한 div → button으로 교체하고 무효한 Tailwind 클래스를 수정하세요
적용 예시: - <div
- className="z-5 absolute top-0 flex w-full justify-items-start px-[8rem] py-[2.5rem]"
- onClick={() => window.location.reload()}
- >
+ <button
+ type="button"
+ aria-label="홈으로 이동"
+ className="z-[5] absolute top-0 flex w-full justify-start px-[8rem] py-[2.5rem]"
+ onClick={() => window.location.reload()}
+ >
<img src={HeaderLogo} alt="header logo" />
- </div>
+ </button>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 헤더라면 의미(semantic)를 생각하면 그리고 header 전체는 |
||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| export default Header; | ||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,7 +4,7 @@ export { default as Card } from './card/Card'; | |||||||
| export { default as Chip } from './chip/Chip'; | ||||||||
| export { default as Input } from './input/Input'; | ||||||||
| export { default as Level } from './level/Level'; | ||||||||
| export { Progress } from './progress/Progress'; | ||||||||
| export { default as Progress } from './progress/Progress'; | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainProgressProps 타입 재노출 누락으로 인한 잠재적 BP 이전 소비자가 export { default as Progress } from './progress/Progress';
+export type { ProgressProps } from './progress/Progress';🏁 Script executed: #!/bin/bash
# 레포 전역에서 ProgressProps 직접 임포트 사용 여부 확인
rg -nP '\bProgressProps\b' -SLength of output: 264 🏁 Script executed: #!/bin/bash
rg -n "export type" -C2 packages/design-system/src/components/index.ts || trueLength of output: 276 ProgressProps 타입 재노출 추가 export { default as Progress } from './progress/Progress';
+export type { ProgressProps } from './progress/Progress';📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||
| export { Switch } from './switch/Switch'; | ||||||||
| export { Textarea } from './textarea/Textarea'; | ||||||||
| export { default as AutoDismissToast } from './toast/hooks/uesFadeOut'; | ||||||||
|
|
||||||||
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.
로고는 사이드바에서도 사용하고 익스텐션에서등 다양한 위치에서 사용된다고 생각하는데 디자인 시스템에 추가하는 것은 어떤가요?
괜찮으시다면 추후 제 사이드바 pr에서 로고 디자인 시스템 위치에 아이콘 적용해뒀는데 가져다 사용해도 좋을것같아요-!