@massds/mayflower-react
Version:
React versions of Mayflower design system UI components
28 lines (27 loc) • 882 B
TypeScript
export interface TabsProps {
/** `handleClick` is a custom callback function that returns the selected tab value.
If `handleClick` is passed in as a function, the tabs will be rendered as buttons, otherwise will be rendered anchor links.
*/
handleClick?(...args: unknown[]): unknown;
/** Default tab value rendered as selected. */
selectedTab?: string;
/**
{
<br />
`href:` is used as anchor link href for the tab if the handleClick is not passed as a function.
<br />
`text:` rendered for the tab
<br />
`arialLabel:` for the tab button if `handleClick` is passed as a function
<br />
}
*/
tabs?: {
value: string;
label: string;
href?: string;
ariaLabel?: string;
}[];
}
declare const Tabs: ({ handleClick, tabs, selectedTab }: TabsProps) => any;
export default Tabs;