-
Notifications
You must be signed in to change notification settings - Fork 253
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
(Feature request): good name of components generated by stitches inside react dev tools #1124
Comments
Though I could see Stitches supporting a const ScrollableContent = styled('div', {
displayName: 'ScrollableContent',
...styles
}) It's probably simpler to just assign it yourself: ScrollableContent.displayName = 'ScrollableContent' Or, in a single expression (less readable, IMO): const ScrollableContent = Object.assign(style('div', {
...styles
}), {
displayName: 'ScrollableContent'
}) |
Related: #1104 is an open issue to document the
So, in your case, I think this will work: const ScrollableContent = styled.withConfig({ displayName: 'ScrollableContent' })('div', { ...styles }) which—again, if I'm reading this correctly—will also inject stitches/packages/core/src/features/css.js Lines 66 to 67 in 02ba207
|
Thanks a lot @shawnbot, i implement it and give you a feedback of the efficiency of the api |
Hi stiches team,
is there a way that generated stitches components get the right component name inside react developper tools ?
It's quite hard to read inside the react chrome inspector.
In the examples bellow i would like to see
ScrollableContent
instead ofStyled.div
inside the react chrome inspectorThe text was updated successfully, but these errors were encountered: