Storybook Router ? #52
Answered
by
mina-gwak
healtheloper
asked this question in
Q&A
-
혹시 Storybook 에서 Routes 를 설정하신 적이 있으신지 여쭤봅니다 Page 단위로도 Storybook 을 작성한다고 하기도 했었던 기억이 있어서 loginPage 를 storybook 에 올렸었는데요, 지금 PR push 가 제대로 github action 이 돌아가지 않아서 원인을 찾다보니 page 가 제대로 보여지지 않는다는 것도 확인했는데 뭔가 Preview 에 decorator 를 잘 만지면 될 것같은 느낌도 들긴 하네요.. export const decorators = [
(Story) => {
const isDarkMode = false;
// window.matchMedia &&
// window.matchMedia('(prefers-color-scheme: dark)').matches;
return (
<ThemeProvider theme={isDarkMode ? darkTheme : lightTheme}>
<GlobalStyle />
<Story /> // 원래 앱에서는 여기서 <Routes />
</ThemeProvider>
);
},
mswDecorator,
]; |
Beta Was this translation helpful? Give feedback.
Answered by
mina-gwak
Oct 11, 2022
Replies: 1 comment 4 replies
-
페이지가 제대로 보여지지 않는다는 게 정확히 어떤 부분에서 문제가 있는 건지 잘 모르겠는데 혹시 좀 더 자세하게 설명해주실 수 있을까요? |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
healtheloper
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
페이지가 제대로 보여지지 않는다는 게 정확히 어떤 부분에서 문제가 있는 건지 잘 모르겠는데 혹시 좀 더 자세하게 설명해주실 수 있을까요?