diff --git a/.changeset/remove-link-data-hover-color.md b/.changeset/remove-link-data-hover-color.md new file mode 100644 index 00000000000..75a8f711492 --- /dev/null +++ b/.changeset/remove-link-data-hover-color.md @@ -0,0 +1,5 @@ +--- +'@primer/react': patch +--- + +Link: Remove unnecessary `data-hover-color` attribute from rendered DOM element diff --git a/packages/react/src/Link/Link.tsx b/packages/react/src/Link/Link.tsx index 5ae1e74f5ba..ca0b1734417 100644 --- a/packages/react/src/Link/Link.tsx +++ b/packages/react/src/Link/Link.tsx @@ -19,7 +19,8 @@ export const UnwrappedLink = ( props: PolymorphicProps, ref: ForwardedRef, ) => { - const {as: Component = 'a', className, inline, muted, hoverColor, ...restProps} = props + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const {as: Component = 'a', className, inline, muted, hoverColor: _hoverColor, ...restProps} = props const innerRef = React.useRef>(null) const mergedRef = useMergedRefs(ref, innerRef) @@ -44,7 +45,6 @@ export const UnwrappedLink = ( data-component="Link" data-muted={muted} data-inline={inline} - data-hover-color={hoverColor} {...restProps} // eslint-disable-next-line @typescript-eslint/no-explicit-any ref={mergedRef as any}