-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
Include styledBy in csskit package #14812
Comments
@yordis I'm happy to expose this helper. I don't think that it should come from |
@oliviertassinari but that is another dependency I need to manage though. For what I can tell, But this function is all about CSS-in-JS functionality. I don't mind either way, but if feels odd installing another package just because of one function. I am currently using (one of the non- As generic as it gets I guess. I don't understand what do you mean by your statement since it seems generic enough. This helper is not about creating specific CSS as Thoughts? |
@yordis I have two comments. The first one is that The second comment is that it's critical to have the smallest possible style package. I fear adding helpers to it will divert us from this goal. |
That makes sense. Well |
I'm closing as we don't use this pattern in the source. So far, we have preferred to access the props at the style level (not the property one) and use an object to map: export const Something = styled('div')((props) => ({
flexGrow: 1,
display: 'flex',
justifyContent: {
start: 'flex-start',
end: 'flex-end',
center: 'center',
}[props.alignContent],
})); |
Expected Behavior 🤔
import { styledBy } from '@material-ui/styles';
expectstyledBy
to be defined.Current Behavior 😯
styledBy
is undefined.Examples 🌈
Context 🔦
Hey folks, I know that you pretty much recommend this function and for the most part is one line function, as such:
But because it is such of small functionality with a huge benefit for me as a consumer of the library, I would prefer to have the function exposed.
My alternatives are, install another package or copy-paste the function in every project that I want to use it, which both of them are not as convenient as simple use it from
material-ui/styles
package which I am using anyway.The text was updated successfully, but these errors were encountered: