Skip to content

Commit 696e9a9

Browse files
committed
fix: Use SVGr icon for example
1 parent f60569e commit 696e9a9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

react/SelectBox/Readme.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ You can display additional actions inside an Option with the ActionsOption compo
212212

213213
```
214214
import SelectBox, { ActionsOption } from 'cozy-ui/transpiled/react/SelectBox';
215+
import TrashIcon from 'cozy-ui/transpiled/react/Icons/Trash';
216+
import RenameIcon from 'cozy-ui/transpiled/react/Icons/Rename';
217+
218+
215219
const options = [
216220
{ value: 'chocolate', label: 'Chocolate' },
217221
{ value: 'strawberry', label: 'Strawberry', isDisabled: true },
@@ -220,8 +224,8 @@ const options = [
220224
];
221225
222226
const CustomOption = (props) => (<ActionsOption {...props} actions={[
223-
{ icon: 'delete', onClick: () => alert('deleting') },
224-
{ icon: 'rename', onClick: ({ data }) => alert(data.value) }
227+
{ icon: TrashIcon, onClick: () => alert('deleting') },
228+
{ icon: RenameIcon, onClick: ({ data }) => alert(data.value) }
225229
]} />);
226230
227231
<SelectBox options={options} components={{

0 commit comments

Comments
 (0)