-
Notifications
You must be signed in to change notification settings - Fork 954
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
Add anchor tag for hash link #469
Conversation
Is it not possible to add the |
I think it's possible. Should I change this? |
Yeah it would simplify the compiled code a bit, can you try this and see if it works. Thanks for the contribution |
I changed to add Usage : pc.box(
id="target",
pc.text("some text"),
) Above code creates this js code. <Box id="target">
<Text>{`some text`}</Text>
</Box> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good calling adding this id
field . I'm a bit confused though - looks like the Anchor class got reverted? Don't we need that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nvm, tried this locally and it works great - awesome work!
I think it was just there as a support for the |
was looking for anchor hash navigation. Adding id to components work, but is there any way to make the scrolling smooth ? |
PR for issue #416.
All Submissions:
Type of change
Please delete options that are not relevant.
New Feature Submission:
After these steps, you're ready to open a pull request.
Added anchor tag that created with key property at any component.
This allows us to jump to to a specific place using hash in URL like "destination/url/#target".
Usage:
Above code creates this.
Anchor tag is placed at the first child tag.