-
-
Notifications
You must be signed in to change notification settings - Fork 154
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: support branding #639
base: next
Are you sure you want to change the base?
Conversation
refactor: add explanation to theme.brand
decorators: [ | ||
(Story) => { | ||
const theme = useTheme(); | ||
return <Story args={{ theme: { ...theme, brand: { title: 'React Native' } } }} />; |
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.
I don't like having this decorator in every story just to make typescript happy. Essentially the problem is only that theme requires a lot of properties that we don't want to define here.
Maybe I missed something to make it easier?
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.
https://github.com/trajano/expo-experiments/blob/4287571d3a9fe568700ce97ecc266d5a5bff621e/packages/my-app/.storybook/index.ts#L11-L16 shows what I did on mine to pass it in, but I cheated with the any
because of the imageSource
thing which you resolved in web-theme.ts I think.
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.
But I think what you have looks correct. At least for the context of the story.
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.
Can't wait to drop my patches :D
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.
I think just use the existing Storybook logo to prevent having another asset,
decorators: [ | ||
(Story) => { | ||
const theme = useTheme(); | ||
return <Story args={{ theme: { ...theme, brand: { title: 'React Native' } } }} />; |
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.
https://github.com/trajano/expo-experiments/blob/4287571d3a9fe568700ce97ecc266d5a5bff621e/packages/my-app/.storybook/index.ts#L11-L16 shows what I did on mine to pass it in, but I cheated with the any
because of the imageSource
thing which you resolved in web-theme.ts I think.
decorators: [ | ||
(Story) => { | ||
const theme = useTheme(); | ||
return <Story args={{ theme: { ...theme, brand: { title: 'React Native' } } }} />; |
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.
But I think what you have looks correct. At least for the context of the story.
Thanks so much for taking the time, I promise I will get to this pr soon. I have a lot going on currently but ideally in this coming week. Feel free to tag me as a reminder if I take too long :). |
I updated by patches but should still be the same |
Implements Feature:
#625
What I did
Support for branding, based on the patches from @trajano. Many thanks!
How it works