-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore: Storybook 셋팅 #114
chore: Storybook 셋팅 #114
Conversation
All로 컴포넌트의 모든 타입를 보여주는 형식 보기에도 깔끔하고 너무 좋은 것 같습니다!! |
export const storyContainer = css({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: '20px', | ||
}); | ||
|
||
export const storyInnerContainer = css({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: '10px', | ||
alignItems: 'flex-start', | ||
}); |
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.
스토리북 작성할 때 story.styles.ts
에 작성된 공통 css 코드로 감싸서 사용하는 건가요?!
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.
넵! 해당 css 코드를 공통으로 사용해서 story 기본 틀을 동일하게 맞추면 더 일관성 있게 보일 것 같아서 작성해두었습니다! 공통 css 사용하시는 것 어떠신가요??
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.
넵 좋습니다!
고생 많으셨습니다! 저도 Default와 All 형식으로 작성하는게 좋을 것 같아요 👍🏻 |
💡 작업 내용
💡 자세한 설명
✅ Storybook 설치
설치 이후 Storybook을 Webpack과 동일한 환경으로 셋팅했습니다.
Storybook 문서 자동화 옵션을 통해 문서를 직접 작성하지 않아도 Docs가 생깁니다. 문서를 자세히 작성하시고 싶으시면 직접 작성하셔도 무방합니다!
✅ Storybook 사용 예제 작성
기존에 만들어둔 Button Component를 예시로 스토리북을 작성해보았습니다.
컴포넌트 Default랑, 모든 타입을 보여주는 All을 작성하는 형식으로 스토리북 형식을 Fix하는 것은 어떠신가요?
✅ Chromatic을 통해 Storybook 배포
현재 배포된 주소는 아래와 같습니다.
https://666f1aee1aefa07ed4bda87d-nntajdvsfz.chromatic.com/?path=/docs/button--docs
✅ Github Actions를 통해 배포 자동화
dev 브랜치로 pr merge 될 때마다 storybook 배포가 자동화되도록 설정했습니다.
하지만 아직 실제로 잘 동작하지는 확인해보지 못했기 때문에 다음 pr merge시 스토리북이 제대로 자동 배포가 되는지 확인해 봐야 할 부분입니다.
📗 참고 자료 (선택)
스토리북 배포 1
스토리북 배포 2
📢 리뷰 요구 사항 (선택)
🚩 후속 작업 (선택)
✅ 셀프 체크리스트
closes #113