props fix

Signed-off-by: npiyush97 <npiyush35@gmail.com>
This commit is contained in:
npiyush97
2024-03-19 09:45:26 +05:30
parent 955e51879a
commit c34bf3c135
2 changed files with 3 additions and 21 deletions
@@ -21,14 +21,5 @@ export type SubRoute = {
path: string;
title: string;
children: JSX.Element;
tabProps?: {
component?: React.ElementType<TabProps>;
to: string;
value?: number;
className?: string;
classes?: {
selected: string;
root: string;
};
};
tabProps?: TabProps<React.ElementType, { component?: React.ElementType }>;
};
@@ -61,16 +61,7 @@ const useStyles = makeStyles(
export type Tab = {
id: string;
label: string;
tabProps?: {
component?: React.ElementType<TabProps>;
to: string;
value?: number;
className?: string;
classes?: {
selected: string;
root: string;
};
};
tabProps?: TabProps<React.ElementType, { component?: React.ElementType }>;
};
type HeaderTabsProps = {
@@ -123,7 +114,6 @@ export function HeaderTabs(props: HeaderTabsProps) {
>
{tabs.map((tab, index) => (
<TabUI
{...tab.tabProps}
data-testid={`header-tab-${index}`}
label={tab.label}
key={tab.id}
@@ -132,6 +122,7 @@ export function HeaderTabs(props: HeaderTabsProps) {
value={index}
className={styles.defaultTab}
classes={{ selected: styles.selected, root: styles.tabRoot }}
{...tab.tabProps}
/>
))}
</Tabs>