Skip to content

feat(popover): add the ability to add extra css classes to s-popover--content element - #2061

Merged
dancormier merged 4 commits into
betafrom
cdoucette/popover-content-inner-class-override
Nov 24, 2025
Merged

feat(popover): add the ability to add extra css classes to s-popover--content element#2061
dancormier merged 4 commits into
betafrom
cdoucette/popover-content-inner-class-override

Conversation

@chris-doucette-stack

@chris-doucette-stack chris-doucette-stack commented Nov 21, 2025

Copy link
Copy Markdown
Collaborator

Summary

This PR adds a new prop contentClass to the PopoverContent component. 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.

@changeset-bot

changeset-bot Bot commented Nov 21, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest 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

@netlify

netlify Bot commented Nov 21, 2025

Copy link
Copy Markdown

Deploy Preview for stacks-svelte ready!

Name Link
🔨 Latest commit a489f92
🔍 Latest deploy log https://app.netlify.com/projects/stacks-svelte/deploys/69245eb0580e97000864417a
😎 Deploy Preview https://deploy-preview-2061--stacks-svelte.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Nov 21, 2025

Copy link
Copy Markdown

Deploy Preview for stacks ready!

Name Link
🔨 Latest commit a489f92
🔍 Latest deploy log https://app.netlify.com/projects/stacks/deploys/69245eb03d2fa900080cd012
😎 Deploy Preview https://deploy-preview-2061--stacks.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@giamir giamir changed the title Adding innerContentClassOverride prop to PopoverContent feat(popover): add the ability to add extra css classes to s-popover--content element Nov 24, 2025

@giamir giamir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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 dancormier left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @chris-doucette-stack and @giamir!

@dancormier
dancormier merged commit da4276a into beta Nov 24, 2025
18 checks passed
@dancormier
dancormier deleted the cdoucette/popover-content-inner-class-override branch November 24, 2025 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants