UNPKG

@wfp/react

Version:
32 lines (24 loc) 776 B
### Text Be concise and specific. Titles have a max of two words. ### Default selection Based on usage, there should be a default selection. The default selection is always the first option in a switcher. ContentSwitcher is forked from [Carbon Components](https://www.carbondesignsystem.com/components/content-switcher/code) ### Usage with react ```js import { ContentSwitcher, Switch } from "@wfp/react"; import { iconAdd } from "@wfp/icons-react"; ``` ```js <ContentSwitcher onChange={onChangeAction}> <Switch name="one" text="First section" onClick={onClickAction} kind="anchor" href="#" icon={<Icon icon={iconAdd} />} /> <Switch name="two" text="Second section" /> <Switch name="three" text="Third section" /> </ContentSwitcher> ```