Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 50x | import * as React from 'react'; import { useTabState as useReakitTabState, TabStateReturn as ReakitTabStateReturn, TabInitialState as ReakitTabInitialState } from 'reakit'; export type TabStateReturn = ReakitTabStateReturn; export type TabInitialState = ReakitTabInitialState; export function useTabState(initialState?: ReakitTabInitialState) { return useReakitTabState(initialState); } export function TabState(props: { children?: (state: TabInitialState) => React.ReactElement<any> } & TabInitialState) { const { children, ...restProps } = props; const state = useTabState(restProps); return props.children(state); } |