UNPKG

@wordpress/components

Version:
43 lines 2.23 kB
/** * Internal dependencies */ import type { TabsProps } from './types'; /** * Tabs is a collection of React components that combine to render * an [ARIA-compliant tabs pattern](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/). * * Tabs organizes content across different screens, data sets, and interactions. * It has two sections: a list of tabs, and the view to show when a tab is chosen. * * `Tabs` itself is a wrapper component and context provider. * It is responsible for managing the state of the tabs, and rendering one instance of the `Tabs.TabList` component and one or more instances of the `Tab.TabPanel` component. */ export declare const Tabs: (({ selectOnMove, defaultTabId, orientation, onSelect, children, selectedTabId, activeTabId, defaultActiveTabId, onActiveTabIdChange, }: TabsProps) => import("react").JSX.Element) & { /** * Renders a single tab. * * The currently active tab receives default styling that can be * overridden with CSS targeting `[aria-selected="true"]`. */ Tab: import("react").ForwardRefExoticComponent<Omit<import("../context").WordPressComponentProps<import("./types").TabProps, "button", false>, "id"> & import("react").RefAttributes<HTMLButtonElement>> & { displayName: string; }; /** * A wrapper component for the `Tab` components. * * It is responsible for rendering the list of tabs. */ TabList: import("react").ForwardRefExoticComponent<import("./types").TabListProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "as"> & import("react").RefAttributes<HTMLDivElement>> & { displayName: string; }; /** * Renders the content to display for a single tab once that tab is selected. */ TabPanel: import("react").ForwardRefExoticComponent<Omit<import("../context").WordPressComponentProps<import("./types").TabPanelProps, "div", false>, "id"> & import("react").RefAttributes<HTMLDivElement>> & { displayName: string; }; Context: import("react").Context<import("./types").TabsContextProps> & { displayName: string; }; }; //# sourceMappingURL=index.d.ts.map