@wfp/react
Version:
WFP UI Kit
32 lines (24 loc) • 776 B
text/mdx
and specific. Titles have a max of two words.
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)
```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>
```
Be concise