@engie-group/fluid-design-system-react
Version:
Fluid Design System React
57 lines (56 loc) • 1.67 kB
TypeScript
import React from 'react';
import { NJTabProps } from './NJTab';
export declare const NJTabs: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
/**
* Label for the tablist element
*/
label: string;
/**
* Id for the default active tab
*/
activeTab?: string;
/**
* Get tab id, tab label and event
* @param id tab id
* @param label tab label
* @param e event
*/
onClickTabItem?: (id: string, label: string, e: React.MouseEvent<HTMLButtonElement>) => void;
/**
* Tabs list density
*/
density?: "normal" | "spacious" | "stretched" | "compact";
/**
* Tab components with their content
*
* `<NJTab label="Item 1" aria-controls="panel1" id="item1" >Content</NJTab>`
*/
children: NJTabProps["children"];
} & React.RefAttributes<HTMLDivElement>>;
export type NJTabsProps = React.ComponentPropsWithoutRef<'div'> & {
/**
* Label for the tablist element
*/
label: string;
/**
* Id for the default active tab
*/
activeTab?: string;
/**
* Get tab id, tab label and event
* @param id tab id
* @param label tab label
* @param e event
*/
onClickTabItem?: (id: string, label: string, e: React.MouseEvent<HTMLButtonElement>) => void;
/**
* Tabs list density
*/
density?: 'normal' | 'spacious' | 'stretched' | 'compact';
/**
* Tab components with their content
*
* `<NJTab label="Item 1" aria-controls="panel1" id="item1" >Content</NJTab>`
*/
children: NJTabProps['children'];
};