Skip to content

Commit

Permalink
fix: Use SVGr icon for example
Browse files Browse the repository at this point in the history
  • Loading branch information
ptbrowne committed Mar 25, 2021
1 parent f60569e commit 696e9a9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions react/SelectBox/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ You can display additional actions inside an Option with the ActionsOption compo

```
import SelectBox, { ActionsOption } from 'cozy-ui/transpiled/react/SelectBox';
import TrashIcon from 'cozy-ui/transpiled/react/Icons/Trash';
import RenameIcon from 'cozy-ui/transpiled/react/Icons/Rename';
const options = [
{ value: 'chocolate', label: 'Chocolate' },
{ value: 'strawberry', label: 'Strawberry', isDisabled: true },
Expand All @@ -220,8 +224,8 @@ const options = [
];
const CustomOption = (props) => (<ActionsOption {...props} actions={[
{ icon: 'delete', onClick: () => alert('deleting') },
{ icon: 'rename', onClick: ({ data }) => alert(data.value) }
{ icon: TrashIcon, onClick: () => alert('deleting') },
{ icon: RenameIcon, onClick: ({ data }) => alert(data.value) }
]} />);
<SelectBox options={options} components={{
Expand Down

0 comments on commit 696e9a9

Please sign in to comment.