mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-13 08:12:48 +02:00
feat(v2): Provide typing to most of the theme-classic components (#3348)
* feat(v2): Provide typing to most of the theme-classic components * Expose type to the end users and dogfood it in v2 website
This commit is contained in:
parent
658dac7d42
commit
bd9b6618c1
31 changed files with 440 additions and 125 deletions
|
@ -6,13 +6,11 @@
|
|||
*/
|
||||
|
||||
import {useState, useCallback, useEffect} from 'react';
|
||||
import type {useTabGroupChoiceReturns} from '@theme/hooks/useTabGroupChoice';
|
||||
|
||||
const TAB_CHOICE_PREFIX = 'docusaurus.tab.';
|
||||
|
||||
const useTabGroupChoice = (): {
|
||||
tabGroupChoices: {readonly [groupId: string]: string};
|
||||
setTabGroupChoices: (groupId: string, newChoice: string) => void;
|
||||
} => {
|
||||
const useTabGroupChoice = (): useTabGroupChoiceReturns => {
|
||||
const [tabGroupChoices, setChoices] = useState<{
|
||||
readonly [groupId: string]: string;
|
||||
}>({});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue