@muraldevkit/ui-toolkit 2.10.0-dev.3 → 2.10.1
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.
- package/dist/components/form/select/MrlSelect/MrlSelect.d.ts +1 -1
- package/dist/components/navigation-sidebar/MrlSidebarNavItem/MrlSidebarNavItem.d.ts +30 -0
- package/dist/components/navigation-sidebar/MrlSidebarNavItem/index.d.ts +1 -0
- package/dist/components/svg/config.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/styles/MrlButton/global.scss +24 -6
- package/dist/styles/MrlSidebarNavItem/module.scss +47 -0
- package/dist/styles/form/global.scss +2 -1
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ export interface MrlSelectProptypes extends React.HTMLAttributes<HTMLDivElement>
|
|
|
13
13
|
defaultValue?: string;
|
|
14
14
|
/**
|
|
15
15
|
* Because this is a custom element, we can't use a standard "for" attribute setup. The label
|
|
16
|
-
* element needs to have an id and then we reference via the select with aria
|
|
16
|
+
* element needs to have an id and then we reference via the select with aria
|
|
17
17
|
*/
|
|
18
18
|
labelId: string;
|
|
19
19
|
/**
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface MrlSidebarNavItemProps {
|
|
3
|
+
/** Additional class to add to the li element */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** Leading icon of the sidebar nav item */
|
|
6
|
+
icon?: Record<string, unknown>;
|
|
7
|
+
/** Sets the selected state for the sidebar nav item */
|
|
8
|
+
isSelected?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Render function used to wrap the sidebar nav item with a link component.
|
|
11
|
+
* It allows users to wrap the sidebar nav item with different link implementations, react-router's link for example.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <MrlSidebarNavItem renderLink={({linkContent}) => <Link to="/">{linkContent}</Link>}/>
|
|
15
|
+
* <MrlSidebarNavItem renderLink={({linkContent}) => <a href="/">{linkContent}</a>}/>
|
|
16
|
+
*/
|
|
17
|
+
renderLink: ({ linkContent }: {
|
|
18
|
+
linkContent: React.ReactNode;
|
|
19
|
+
}) => JSX.Element;
|
|
20
|
+
/** The text of the sidebar item */
|
|
21
|
+
text?: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Sidebar nav item component
|
|
25
|
+
*
|
|
26
|
+
* @param {MrlSidebarNavItemProps} props - the component props
|
|
27
|
+
* @returns a sidebar nav item
|
|
28
|
+
*/
|
|
29
|
+
export declare function MrlSidebarNavItem({ className, icon, isSelected, text, renderLink }: MrlSidebarNavItemProps): JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlSidebarNavItem';
|