Skip to content
Draft
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
15 changes: 10 additions & 5 deletions packages/react/src/Link/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {useMergedRefs} from '../hooks'
import classes from './Link.module.css'
import type {ComponentProps} from '../utils/types'
import {type PolymorphicProps, fixedForwardRef} from '../utils/modern-polymorphic'
import {mergeProps} from '../utils/mergeProps'

type StyledLinkProps<As extends React.ElementType = 'a'> = {
as?: As
Expand Down Expand Up @@ -41,13 +42,17 @@ export const UnwrappedLink = <As extends React.ElementType = 'a'>(

return (
<Component
className={clsx(className, classes.Link)}
data-component="Link"
data-muted={muted}
data-inline={inline}
{...restProps}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
ref={mergedRef as any}
{...mergeProps(
{
className: clsx(classes.Link, className),
'data-component': 'Link',
'data-muted': muted,
'data-inline': inline,
},
restProps,
)}
/>
)
}
Expand Down
Loading