Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/react/src/Link/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const UnwrappedLink = <As extends React.ElementType = 'a'>(
props: PolymorphicProps<As, 'a', StyledLinkProps>,
ref: ForwardedRef<unknown>,
) => {
const {as: Component = 'a', className, inline, hoverColor, ...restProps} = props
const {as: Component = 'a', className, inline, muted, hoverColor, ...restProps} = props
const innerRef = React.useRef<ElementRef<As>>(null)
useRefObjectAsForwardedRef(ref, innerRef)

Expand Down Expand Up @@ -49,7 +49,7 @@ export const UnwrappedLink = <As extends React.ElementType = 'a'>(
return (
<Component
className={clsx(className, classes.Link)}
data-muted={restProps.muted}
data-muted={muted}
data-inline={inline}
data-hover-color={hoverColor}
{...restProps}
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/Link/__tests__/Link.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ describe('Link', () => {
it('respects the "muted" prop', () => {
const {container} = render(<Link muted />)
expect(container.firstChild).toHaveAttribute('data-muted', 'true')
expect(container.firstChild).not.toHaveAttribute('muted')
})

it('logs a warning when trying to render invalid "as" prop', () => {
Expand Down