diff --git a/src/Nav/index.tsx b/src/Nav/index.tsx index 62923f1..430eed3 100644 --- a/src/Nav/index.tsx +++ b/src/Nav/index.tsx @@ -18,18 +18,18 @@ interface ILink { path: string; } -interface ISection { +interface INavSection { name: string; links: { [key: string]: ILink }; } -interface INavigation { +interface INavNavigation { title: string; - sections: { [key: string]: ISection }; + sections: { [key: string]: INavSection }; } interface INav { - navigation: INavigation; + navigation: INavNavigation; logoutPath: string; logoutTitle: string; } @@ -55,7 +55,7 @@ const Links = (props: INavLink) => { return <>{LinkElements} ; }; -const MultiSections = ({ navigation }: Pick) => { +const MultiSections = ({ navigation }: INav) => { const sections = Object.keys(navigation.sections); return ( @@ -87,7 +87,7 @@ const MultiSections = ({ navigation }: Pick) => { ); }; -const OneSection = ({ navigation }: Pick) => { +const OneSection = ({ navigation }: INav) => { const section = Object.keys(navigation.sections).join(); return ( @@ -117,9 +117,17 @@ const Nav = (props: INav) => { {navigation.title} {Object.keys(navigation.sections).length > 1 ? ( - + ) : ( - + )} { }; export { Nav }; -export type { INav, INavLink, ILink, ISection, INavigation }; +export type { INav, INavLink, ILink, INavSection, INavNavigation }; diff --git a/src/index.ts b/src/index.ts index dd560cf..3b82e77 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,4 @@ export { Nav } from "./Nav"; export { NavLink } from "./NavLink"; +export type { INav, ILink, INavSection, INavNavigation } from "./Nav"; +export type { INavLink } from "./NavLink"; diff --git a/vite.config.ts b/vite.config.ts index caa4e7d..dab3969 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -17,7 +17,7 @@ export default defineConfig({ "react-dom", "styled-components", "react/jsx-runtime", - "react-icons", + "react-icons/md", "react-router-dom", "@inubekit/foundations", "@inubekit/stack",