Skip to content
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

feat: add rootMargin to TableOfContents builder #1210

Merged
merged 3 commits into from
Jun 28, 2024

Conversation

bolstycjw
Copy link
Contributor

Motivation

TableOfContents interaction observer allows passing in scroll offset, which can be used to account for fixed/sticky headers when scrolling, but there is no way to cater for that in interaction observer.

Changes

This PR adds a rootMargin argument for TableOfContents builder, which is then passed to the InteractionObserver constructor, thus catering for viewport customisation and use cases like fixed headers/footers.

support rootMargin argument for TableOfContents builder to cater for viewport customisation
Copy link

changeset-bot bot commented May 27, 2024

🦋 Changeset detected

Latest commit: 6483776

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@melt-ui/svelte Minor

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

@TGlide
Copy link
Member

TGlide commented Jun 27, 2024

Awesome, would you mind adding info to the docs as well?

@bolstycjw
Copy link
Contributor Author

have updated the docs :)

Copy link
Member

@TGlide TGlide left a comment

Choose a reason for hiding this comment

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

Awesome, thank you!

@TGlide TGlide merged commit 13275cf into melt-ui:develop Jun 28, 2024
5 of 6 checks passed
This was referenced Jun 28, 2024
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.

None yet

3 participants