Skip to content

Commit

Permalink
fix: forwardRef from SideNavigationLink component
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryanporwal committed Sep 2, 2024
1 parent f60d6bc commit befd701
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ export type Props<L = LinkDefaultElement> = Omit<
*/
component?: SideNavigationBaseProps<L>["component"];
};
const SideNavigationLink = forwardRef<HTMLAnchorElement, Props>(
({ component, ref, ...props }: Props) => {

const SideNavigationLink = forwardRef<HTMLAnchorElement, Props<LinkDefaultElement>>(

Check failure on line 21 in src/components/SideNavigation/SideNavigationLink/SideNavigationLink.tsx

View workflow job for this annotation

GitHub Actions / Lint, build and test

Replace `HTMLAnchorElement,·Props<LinkDefaultElement>>(⏎··` with `⏎··HTMLAnchorElement,⏎··Props<LinkDefaultElement>⏎>(`
({ component, ...props }, ref) => {
let className: string | null = null;

Check failure on line 23 in src/components/SideNavigation/SideNavigationLink/SideNavigationLink.tsx

View workflow job for this annotation

GitHub Actions / Lint, build and test

Replace `····` with `··`
if ("className" in props && typeof props.className === "string") {

Check failure on line 24 in src/components/SideNavigation/SideNavigationLink/SideNavigationLink.tsx

View workflow job for this annotation

GitHub Actions / Lint, build and test

Delete `··`
className = props.className;

Check failure on line 25 in src/components/SideNavigation/SideNavigationLink/SideNavigationLink.tsx

View workflow job for this annotation

GitHub Actions / Lint, build and test

Delete `··`
Expand All @@ -28,6 +29,7 @@ const SideNavigationLink = forwardRef<HTMLAnchorElement, Props>(
<SideNavigationBase

Check failure on line 29 in src/components/SideNavigation/SideNavigationLink/SideNavigationLink.tsx

View workflow job for this annotation

GitHub Actions / Lint, build and test

Delete `··`
className={classNames("p-side-navigation__link", className)}

Check failure on line 30 in src/components/SideNavigation/SideNavigationLink/SideNavigationLink.tsx

View workflow job for this annotation

GitHub Actions / Lint, build and test

Delete `··`
component={component ?? "a"}

Check failure on line 31 in src/components/SideNavigation/SideNavigationLink/SideNavigationLink.tsx

View workflow job for this annotation

GitHub Actions / Lint, build and test

Delete `··`
ref={ref}
{...props}
/>
);
Expand Down

0 comments on commit befd701

Please sign in to comment.