feat(popover): add the ability to add extra css classes to s-popover--content element - #2061
Conversation
🦋 Changeset detectedLatest commit: a489f92 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for stacks-svelte ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for stacks ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
@chris-doucette-stack Thanks for the PR. I took the liberty of pushing a commit with my suggestions directly in this PR branch. I hope that's ok. We can always revert it.
In a nutshell I think we should treat this escape hatch as we treat any other class addition props. It should not override but it should give you the option to append atomic classes which will ultimately have the override effects you need. I have also added an extra story to storybook to show how custom classes could be applied.
https://deploy-preview-2061--stacks-svelte.netlify.app/?path=/story/components-popover--custom-classes
Let's wait for a thumbs up from @dancormier and then merge.
dancormier
left a comment
There was a problem hiding this comment.
LGTM! Thanks @chris-doucette-stack and @giamir!
Summary
This PR adds a new prop
contentClassto thePopoverContentcomponent. This prop add additional classes on the inner content div (s-popover--content) that is otherwise inaccessible. This change is important for popovers with custom padding values to prevent the inner div from overflowing from its parent container.