-
Notifications
You must be signed in to change notification settings - Fork 0
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
General feedback #73
Comments
Ah that's a good point. It's kind of weird because the theme and the default colors are params I'd rather have the user configure upfront (because they're meaningless if unset), but if you're just trying out the lib then defining the theme and defaults colors can be an annoying setup. I think you're right on this. I think I'll do empty object as the default theme and maybe black and white as the default
They're separate because they can be used at different times. In particular, the For example, if you're creating a card that takes in a dynamic color as the It's hard to explain in text why this is nice but the idea here is that the color context provider gives a way for other components down the tree to react to a color context set by an ancestor. This is a challenge for me to document in a succinct way 😅 I do agree though that's it's very weird for a library to ask you to wrap your App in two providers (it's almost pretentious lol). I think maybe the
Agreed. I'm not super happy with this API but it allows for a lot behinds the scenes which is why I went with it. In particular, the existence of the The simplest example is the function createStyles(/* ... */) {
function useStyles(incomingProps) {
function Root(rootProps, Component) {
return (
<Component
className={classNames(
incomingProps.className,
rootProps.className
)}
/>
);
}
return { Root, /* ... */ };
}
return useStyles;
} Without the
<Root type="main"> I like that a lot! I'll have to see if there is any technical limitations, but that feels way better! Thanks for all this great feedback ❤️. I'll definitely address these soon! |
Hiya! I tried out the lib here:
https://codesandbox.io/s/empty-moon-eo93i?file=/src/App.js
Here's some feedback, I only skirted though the docs (sorry! 🙏 ) so please forgive me if some of these are already addressed. For some context, I have only used
styled-components
-liked solutions and am not familiar withmaterial-ui
.I noticed that
react-style-system
requires a bit of setup to get going.ThemeProvider
andColorContextProvider
seem to be required. I wonder if these can be optional until users need them; it'll make trying out easier.It wasn't clear why
ColorContextProvider
is separated fromThemeProvider
. Could they be combined?I found it a bit awkward to specify the root component's element type as the second argument of
useStyles
. I'm sure there's a technical limitation at play here, but I'd find something like this more intuitive:Or at least something like
Curious to hear your thought, it's a cool lib! 👍
The text was updated successfully, but these errors were encountered: