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

Export headings and desktop and add hide prop #14

Merged
merged 7 commits into from
Aug 24, 2022

Conversation

Amerlander
Copy link
Contributor

@Amerlander Amerlander commented Aug 24, 2022

  • Export the array of headings
  • Export if desktop is active or not
  • Add option to hide toc

Knowing if Toc is in desktop mode enables me to change the layout according to that and change my layout to use the space without having to make extra calculations

I want to hide Toc when there are less than 2 headlines. So the headlines are exported to be able to count them and a hide prop is added to be able to hide the Toc.

Amerlander and others added 3 commits August 24, 2022 03:13
- Export the array of headings
- Export if desktop is active or not
- Add option to disable visibility

Knowing if Toc is in desktop mode enables me to change the layout according to that and change my layout to use the space without having to make extra calculations

I want to hide Toc when there are less than 2 headlines. So the headlines are exported to be able to count them and a visible prop is added to be able to hide the Toc.
Change `visible` to `hide` since it feels more convenient
@Amerlander Amerlander changed the title Export headings and desktop and add visiblity prop Export headings and desktop and add hide prop Aug 24, 2022
@janosh janosh merged commit d1f2484 into janosh:main Aug 24, 2022
@janosh
Copy link
Owner

janosh commented Aug 24, 2022

Good additions all! 👍

Also thanks for describing all the use cases behind your changes.

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

2 participants