-
Notifications
You must be signed in to change notification settings - Fork 98
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(Portal): take in consideration parent theme #1506
Conversation
Preview is ready. |
Playwright Test Component is ready. |
94e7969
to
22980f3
Compare
22980f3
to
886c785
Compare
886c785
to
380ffbe
Compare
// don't support runtime breakpoint redefinition. Breakpoints defined only one at LayoutTheme | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, []); | ||
}, [breakpointsMap]); |
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.
if user pass layout theme object like
<ThemeProvider layout={{
config: {
breakpoints: {...}
}
}} >...</ThemeProvider>
and App
will have some state upper ThemeProvider it will cause this function to be constantly recalculated.
We need good reasons to be able to set breakpoints dynamically in runtime
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.
if config
never changes, the user can move its creation outside the component. Otherwise, he can expect the changes to be taken into account.
@@ -8,4 +8,5 @@ export interface ThemeContextProps { | |||
theme: Theme; | |||
themeValue: RealTheme; | |||
direction: Direction; | |||
scoped?: boolean; |
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.
may be some comment here?
why is this property needed?
No description provided.