type TabId = string | number;
interface Tabs {
/**
* Initial selected tab `id`, for uncontrolled usage.
*/
defaultSelectedTabId?: TabId;
/**
* Selected tab `id`, for controlled usage.
* Providing this prop will put the component in controlled mode.
* Unknown ids will result in empty selection (no errors).
*/
selectedTabId?: TabId;
/**
* A callback function that is invoked when a tab in the tab list is clicked.
*/
onChange?(newTabId: TabId, prevTabId: TabId): void;
}
interface Tab {
/**
* Unique identifier used to control which tab is selected
*
*/
id: TabId;
/**
* The tab label
*/
label: string;
}
Description
Instead of putting state into the react-hig adapter layer, we should be stricly adhering to the hig.web stateless API and adapting it to React. Once we have low level React Components we can easily create higher level stateful components which are much easier to manage.
Motivation and Context
How Has This Been Tested?
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
Demonstrates #279
Description
Instead of putting state into the react-hig adapter layer, we should be stricly adhering to the hig.web stateless API and adapting it to React. Once we have low level React Components we can easily create higher level stateful components which are much easier to manage.
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: