File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -212,6 +212,10 @@ You can display additional actions inside an Option with the ActionsOption compo
212
212
213
213
```
214
214
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
+
215
219
const options = [
216
220
{ value: 'chocolate', label: 'Chocolate' },
217
221
{ value: 'strawberry', label: 'Strawberry', isDisabled: true },
@@ -220,8 +224,8 @@ const options = [
220
224
];
221
225
222
226
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) }
225
229
]} />);
226
230
227
231
<SelectBox options={options} components={{
You can’t perform that action at this time.
0 commit comments