-
Notifications
You must be signed in to change notification settings - Fork 648
Add missing link variant to Button
#4814
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
Changes from 9 commits
64c04fc
f99c9ce
a213f91
aec7989
d699614
6e8571d
9202eaf
bc790dc
7ba0325
7ad25a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@primer/react": patch | ||
| --- | ||
|
|
||
| Add `link` variant to Button | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,9 +2,8 @@ import {EyeIcon, TriangleDownIcon, HeartIcon, DownloadIcon, CommentIcon} from '@ | |||||||||||||||||
| import React, {useState} from 'react' | ||||||||||||||||||
| import {Button} from '.' | ||||||||||||||||||
| import {Stack} from '../Stack/Stack' | ||||||||||||||||||
| import Link from '../Link' | ||||||||||||||||||
| import {announce} from '@primer/live-region-element' | ||||||||||||||||||
|
|
||||||||||||||||||
| import {Tooltip} from '../TooltipV2/Tooltip' | ||||||||||||||||||
| export default { | ||||||||||||||||||
| title: 'Components/Button/Features', | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
@@ -15,6 +14,8 @@ export const Danger = () => <Button variant="danger">Danger</Button> | |||||||||||||||||
|
|
||||||||||||||||||
| export const Invisible = () => <Button variant="invisible">Invisible</Button> | ||||||||||||||||||
|
|
||||||||||||||||||
| export const Link = () => <Button variant="link">Button that looks like a link</Button> | ||||||||||||||||||
|
|
||||||||||||||||||
| export const LeadingVisual = () => <Button leadingVisual={HeartIcon}>Leading visual</Button> | ||||||||||||||||||
|
|
||||||||||||||||||
| export const TrailingVisual = () => <Button trailingVisual={EyeIcon}>Trailing visual</Button> | ||||||||||||||||||
|
|
@@ -31,9 +32,12 @@ const AccessibilityNote = () => { | |||||||||||||||||
| </p> | ||||||||||||||||||
| <p> | ||||||||||||||||||
| Learn more about at{' '} | ||||||||||||||||||
| <Link href="https://github.com/github/accessibility/blob/8b300b36d8bca28fd5e3e70ffa077a6f8ee65c05/docs/wiki/screen-reader-testing/dynamically-updated-buttons-support-april-2024.md"> | ||||||||||||||||||
| <a | ||||||||||||||||||
| style={{color: 'var(--fgColor-link)', textDecoration: 'underline'}} | ||||||||||||||||||
| href="https://github.com/github/accessibility/blob/8b300b36d8bca28fd5e3e70ffa077a6f8ee65c05/docs/wiki/screen-reader-testing/dynamically-updated-buttons-support-april-2024.md" | ||||||||||||||||||
| > | ||||||||||||||||||
|
Comment on lines
+35
to
+38
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of manually styling these, we could use the
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was competing with the |
||||||||||||||||||
| Staff-only: Dynamically updated button labels | ||||||||||||||||||
| </Link> | ||||||||||||||||||
| </a> | ||||||||||||||||||
| . | ||||||||||||||||||
| </p> | ||||||||||||||||||
| </> | ||||||||||||||||||
|
|
@@ -200,3 +204,9 @@ export const LabelWrap = () => { | |||||||||||||||||
| </Stack> | ||||||||||||||||||
| ) | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| export const InactiveButtonWithTooltip = () => ( | ||||||||||||||||||
| <Tooltip text="Action unavailable: an error occured while loading respository permissions" direction="n"> | ||||||||||||||||||
| <Button inactive>Review changes</Button> | ||||||||||||||||||
| </Tooltip> | ||||||||||||||||||
| ) | ||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.