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

[Feature request] Add support for multiple AnchorNav.Action #452

Closed
simurai opened this issue Oct 6, 2023 · 3 comments
Closed

[Feature request] Add support for multiple AnchorNav.Action #452

simurai opened this issue Oct 6, 2023 · 3 comments

Comments

@simurai
Copy link
Contributor

simurai commented Oct 6, 2023

This came up when starting with the Copilot implementation.

Current state

AnchorNav only supports a single AnchorNav.Action:

Image

Feature request

In Figma we would like the navigation to have 2 AnchorNav.Action.

Image

I guess it's similar to how SubdomainNavBar can have a "Primary" and a "Secondary" action.

Current workarounds

For now, the "Compare plans" is moved to a AnchorNav.Link. IMO that's the better option in this specific case since we do have a "Pricing" section, so it would be odd if it's not part of the "normal" navigation. But even if we would go with this for Copilot, the need for a Primary and Secondary action will probably come up again sooner or later.

Image

Another option might be add 2 AnchorNav.Action (which works), and then add some custom styling to make it appear like a primary button. But that's more an emergency hack and shouldn't be kept long term.

/cc @jesussandreas @ajashams

@joseph-lozano
Copy link
Contributor

@rezrah should #498 close this?

@joseph-lozano
Copy link
Contributor

Closed by #498

@rezrah
Copy link
Collaborator

rezrah commented Dec 1, 2023

@joseph-lozano that's correct. Thanks for following up.

@simurai - documentation for the secondary action is here: https://primer.style/brand/components/AnchorNav#secondary-action


Edit: Spoke too soon. Looks like it hasn't shipped just yet: #501. We'll get the next release out early next week.

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

No branches or pull requests

3 participants