-
Notifications
You must be signed in to change notification settings - Fork 137
-
Is your feature request related to a problem? Please describe.
I noticed the React library has a GridItem component, this seems helpful for configuring column spans and such. I am much more of a bootstrap person, so I'm used to classes like col-md-8
, offset-md-8
...
Describe the solution you'd like
A component that accepts props like colSpan
, colStart
, colEnd
...
See: https://chakra-ui.com/docs/layout/grid#griditem-props
Describe alternatives you've considered
I've created my own component that handles inline styles for the above-mentioned props.
Additional context
If there is a way to do this already, please let me know. I tried searching issues for "Grid Item", but there is nothing. If a solution exists, maybe it can just be added to the docs?
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
Replies: 1 comment 3 replies
-
Hey @IHIutch Thanks for the feature request!
Currently v0 doesn't implement this as a component. I don't see any harm in adding a component like this to the project. However, I'm not yet sure if it should be implemented in the v0
library core, as a recipe, or in user land as a custom component. Your points are pretty good ones. 🤔 I haven't yet encountered this use case yet.
Since I'm not really sure which exact direction to take, I'm happy to covert this issue into a discussion if you have some more ideas or if other users may feel the same way so as to add this to the core v0
library.
Beta Was this translation helpful? Give feedback.
All reactions
-
This maybe is a little easier than I thought it would be, looking at how it works in the React lib
It turns out grid-column-start
and grid-column-end
props work on CBox
, which basically does everything you'd want. (I just find grid-column-end
incredibly confusing, so I much prefer "col-span" 😅) So maybe just adding that to the docs is enough?
That being said, it seems rather straightforward to create this component, so I can take a stab at it? Let me know if you think it's valuable to do for v0 otherwise, I can try making it for v1.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Cool. I'm open to the idea! Feel free to send in a PR! We love PRs 😀
At the moment I'm focusing my efforts on v1
and keeping things moving on there so I'm happy to have you take a stab at this 🎉
Beta Was this translation helpful? Give feedback.
All reactions
-
Okay, I started this here. This is a little more than I've done so far, so I'd appreciate your thoughts on organizing things a bit better.
And if you have any direction for tests and updates to the docs, I'll update those as well
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1