@canonical/react-components 1.2.4 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { HTMLProps
|
|
2
|
+
import type { HTMLProps } from "react";
|
|
3
3
|
import type { SideNavigationBaseProps } from "../SideNavigationBase";
|
|
4
|
+
import { PropsWithSpread } from "../../../types";
|
|
4
5
|
export type LinkDefaultElement = HTMLProps<HTMLAnchorElement>;
|
|
5
|
-
export type Props<L = LinkDefaultElement, E = HTMLAnchorElement> =
|
|
6
|
-
/**
|
|
7
|
-
* The navigation item's label.
|
|
8
|
-
*/
|
|
9
|
-
label: ReactNode;
|
|
6
|
+
export type Props<L = LinkDefaultElement, E = HTMLAnchorElement> = PropsWithSpread<{
|
|
10
7
|
/**
|
|
11
8
|
* The component or element to use for the link element e.g. `a` or `NavLink`.
|
|
12
9
|
* @default a
|
|
@@ -16,6 +13,6 @@ export type Props<L = LinkDefaultElement, E = HTMLAnchorElement> = Partial<Omit<
|
|
|
16
13
|
* A ref to pass to the link element.
|
|
17
14
|
*/
|
|
18
15
|
forwardRef?: React.Ref<E> | null;
|
|
19
|
-
}
|
|
16
|
+
}, Omit<SideNavigationBaseProps<L>, "component">>;
|
|
20
17
|
declare const SideNavigationLink: <L = LinkDefaultElement, E = HTMLAnchorElement>({ component, forwardRef, ...props }: Props<L, E>) => React.JSX.Element;
|
|
21
18
|
export default SideNavigationLink;
|