grommet / grommet-site

Site for Grommet v2
Apache License 2.0
32 stars 67 forks source link

Document Grommet's box cssGap option on Box `gap` prop #481

Closed jcfilben closed 1 year ago

jcfilben commented 1 year ago

You can change the behavior of Box's gap by setting options={{box: { cssGap: true } }} on the Grommet container. This is documented on the Grommet options prop but not on the Box gap prop. This PR makes note of this on the Box gap prop description.

Closes https://github.com/grommet/grommet-site/issues/480

halocline commented 1 year ago

Looks great and I double checked it actually works that way :)

Is there value to allowing an opt-in at the instance level of a particular Box as well? I can see the value at the Grommet level, but what if I want to gradually convert? I would suspect I'd run into issues by opting in all at once, and desiring some sort of migration path. Thoughts?

MikeKingdom commented 1 year ago

Looks great and I double checked it actually works that way :)

Is there value to allowing an opt-in at the instance level of a particular Box as well? I can see the value at the Grommet level, but what if I want to gradually convert? I would suspect I'd run into issues by opting in all at once, and desiring some sort of migration path. Thoughts?

Great question since I was just thinking I'd love to use this but it's tough to in an existing app. I'd vote for adding this as a follow on effort.

jcfilben commented 1 year ago

Is there value to allowing an opt-in at the instance level of a particular Box as well? I can see the value at the Grommet level, but what if I want to gradually convert? I would suspect I'd run into issues by opting in all at once, and desiring some sort of migration path. Thoughts?

Great question since I was just thinking I'd love to use this but it's tough to in an existing app. I'd vote for adding this as a follow on effort.

Good idea, I'm supportive of adding that.

jcfilben commented 1 year ago

I'm going to merge this PR into the docs for now. Once we have the behavior that allows us to specify cssGap at the Box level we can go back in and adjust the docs.

jcfilben commented 1 year ago

Created an issue for adding cssGap opt-in at the Box level: https://github.com/grommet/grommet/issues/6832