Skip to content

Commit

Permalink
chore: type naming and order
Browse files Browse the repository at this point in the history
  • Loading branch information
timoheddes committed Aug 11, 2023
1 parent 4bd1bc0 commit ea61a1a
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 19 deletions.
4 changes: 2 additions & 2 deletions packages/libs/react-ui/src/components/NavFooter/NavFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { INavFooterPanelProps } from './NavFooterPanel';
import { darkThemeClass } from '@theme/vars.css';
import React, { FC, FunctionComponentElement } from 'react';

export interface INavFooterContainerProps {
export interface INavFooterRootProps {
children: FunctionComponentElement<INavFooterPanelProps>[];
darkMode?: boolean;
}

export const NavFooterContainer: FC<INavFooterContainerProps> = ({
export const NavFooterContainer: FC<INavFooterRootProps> = ({
children,
darkMode = false,
}) => {
Expand Down
6 changes: 3 additions & 3 deletions packages/libs/react-ui/src/components/NavFooter/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { INavFooterContainerProps } from './NavFooter';
import type { INavFooterRootProps } from './NavFooter';
import { NavFooterContainer } from './NavFooter';
import type { INavFooterIconButtonProps } from './NavFooterIconButton';
import { NavFooterIconButton } from './NavFooterIconButton';
Expand All @@ -10,14 +10,14 @@ import { NavFooterPanel } from './NavFooterPanel';
import { FC } from 'react';

export {
INavFooterContainerProps,
INavFooterRootProps,
INavFooterIconButtonProps,
INavFooterLinkProps,
INavFooterPanelProps,
};

export interface INavFooterProps {
Root: FC<INavFooterContainerProps>;
Root: FC<INavFooterRootProps>;
Panel: FC<INavFooterPanelProps>;
Link: FC<INavFooterLinkProps>;
IconButton: FC<INavFooterIconButtonProps>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { INavHeaderContainerProps, INavItems } from './NavHeader';
import type { INavHeaderRootProps, INavItems } from './NavHeader';
import { NavHeader } from './';

import { logoVariants } from '@components/BrandLogo';
Expand Down Expand Up @@ -30,7 +30,7 @@ type StoryProps = {
renderSampleContent: boolean;
useCustomNavigation: boolean;
customNavigation: INavItems;
} & INavHeaderContainerProps;
} & INavHeaderRootProps;

const meta: Meta<StoryProps> = {
title: 'Navigation/NavHeader',
Expand Down
4 changes: 2 additions & 2 deletions packages/libs/react-ui/src/components/NavHeader/NavHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ export interface INavItem {
}
export type INavItems = INavItem[];

export interface INavHeaderContainerProps {
export interface INavHeaderRootProps {
brand?: LogoVariant;
children?: FunctionComponentElement<
INavHeaderNavigationProps | INavHeaderContentProps
>[];
items?: INavItems;
}

export const NavHeaderContainer: FC<INavHeaderContainerProps> = ({
export const NavHeaderContainer: FC<INavHeaderRootProps> = ({
brand = logoVariants[0],
children,
}) => {
Expand Down
11 changes: 9 additions & 2 deletions packages/libs/react-ui/src/components/NavHeader/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { INavHeaderContainerProps } from './NavHeader';
import type { INavHeaderRootProps } from './NavHeader';
import { NavHeaderContainer } from './NavHeader';
import type { INavHeaderContentProps } from './NavHeaderContent';
import { NavHeaderContent } from './NavHeaderContent';
Expand All @@ -9,8 +9,15 @@ import { NavHeaderNavigation } from './NavHeaderNavigation';

import { FC } from 'react';

export {
INavHeaderRootProps,
INavHeaderContentProps,
INavHeaderLinkProps,
INavHeaderNavigationProps,
};

export interface INavHeaderProps {
Root: FC<INavHeaderContainerProps>;
Root: FC<INavHeaderRootProps>;
Navigation: FC<INavHeaderNavigationProps>;
Link: FC<INavHeaderLinkProps>;
Content: FC<INavHeaderContentProps>;
Expand Down
14 changes: 10 additions & 4 deletions packages/libs/react-ui/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,27 @@ export type { ITooltipProps } from './Tooltip';
export type { ITrackerCardProps, ILabelValue } from './TrackerCard/TrackerCard';
export type { ITreeProps } from './Tree';
export type {
INavFooterContainerProps,
INavFooterPanelProps,
INavFooterIconButtonProps,
INavFooterLinkProps,
INavFooterPanelProps,
INavFooterRootProps,
} from './NavFooter';
export type {
INotificationProps,
INavHeaderContentProps,
INavHeaderLinkProps,
INavHeaderNavigationProps,
INavHeaderRootProps,
} from './NavHeader';
export type {
INotificationActionsProps,
INotificationProps,
} from './Notification';
export type {
ITableProps,
ITBodyProps,
ITdProps,
IThProps,
ITHeadProps,
IThProps,
ITrProps,
} from './Table';
export type {
Expand Down
12 changes: 8 additions & 4 deletions packages/libs/react-ui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,17 @@ export type {
INavFooterIconButtonProps,
INavFooterLinkProps,
INavFooterPanelProps,
INavFooterContainerProps,
INavFooterRootProps,
INavHeaderContentProps,
INavHeaderLinkProps,
INavHeaderNavigationProps,
INavHeaderRootProps,
INotificationActionsProps,
INotificationProps,
InputWrapperStatus,
IOptionProps,
IPaginationProps,
IProfileCardProps,
IProgressBarProps,
ISelectProps,
IStackProps,
Expand All @@ -48,7 +53,6 @@ export type {
ITrackerCardProps,
ITreeProps,
ITrProps,
IProfileCardProps,
} from './components';

export {
Expand All @@ -58,6 +62,7 @@ export {
Button,
Card,
ContentHeader,
Divider,
GradientText,
Grid,
Heading,
Expand All @@ -74,6 +79,7 @@ export {
Option,
Pagination,
ProductIcon,
ProfileCard,
ProgressBar,
Select,
Stack,
Expand All @@ -87,8 +93,6 @@ export {
TrackerCard,
Tree,
useModal,
Divider,
ProfileCard,
} from './components';

export { breakpoints } from './styles';

0 comments on commit ea61a1a

Please sign in to comment.