Add link element#87
Draft
oliverabrahams wants to merge 8 commits intomainfrom
Draft
Conversation
# Conflicts: # src/index.ts
|
🐥 |
|
🐥 |
|
🐥 |
Dependency Compatibility Matrix
|
|
🐥 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Adds the Link Element to the design system. It builds off the React Aria Link.
It has the same props as that link with one additional one for the typography variant, defaulting to
body-smHow has this change been tested?
It has been used in storybook but has not been dogfooded anywhere.
How can we measure success?
This component gets used in the upcoming migration of the Newsletters tool.
Have we considered potential risks?
Low risk, It is mostly just a few styles on top of the ReactAria Link
Link
A text link for navigation.
When to use
Links with an href will be handled by the browser, or via a client side router.
Links without an href will be rendered as a
<span role="link">instead of an<a>.Use the onPress event to handle user interaction. If the intent is to trigger an action (not navigation), use the button component.
Example usage
Props
childrenReact.ReactNodehrefstringthemeLinkThemecssOverridesSerializedStylesclassNamestringisDisabledbooleanfalsetypographyTypographyVariantbody-sm...propsOmit<RACLinkProps, 'children'>react-aria-componentsLink.Accessibility