UNPKG

@drivy/cobalt

Version:

Opinionated design system for Drivy's projects.

44 lines (43 loc) 987 B
import React from "react"; export type TabsPropsType = { children?: React.ReactNode; /** * Index of the initial actived tab (first tab by default) */ defaultTabId?: string; /** * Method to be run on tab change */ onChange?: (id: string) => void; /** * Left aligned tabs with no uppercased labels */ subLevel?: boolean; }; type TabPropsType = { children?: React.ReactNode; /** * Unique id of the tab */ id: string; /** * Label/title of the tab */ label: string | React.ReactNode; /** * Hypertext link. If provided, the tab will be an anchor */ href?: string; }; export declare const Tab: { (_props: TabPropsType): null; displayName: string; }; declare const Tabs: { ({ defaultTabId, subLevel, children, onChange, }: TabsPropsType): React.JSX.Element; Tab: { (_props: TabPropsType): null; displayName: string; }; }; export default Tabs;