Skip to content

Commit

Permalink
chore: updated custom render example
Browse files Browse the repository at this point in the history
  • Loading branch information
it-nalon committed Apr 23, 2021
1 parent dab8eca commit abbb2a8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,17 @@ export default function App() {
)
}

const customCreateItemRender = (value) => {
return (
<Text>
<Box as='span'>Create</Box>{' '}
<Box as='span' bg='red.300' fontWeight='bold'>
"{value}"
</Box>
</Text>
)
}



return (
Expand All @@ -175,6 +186,7 @@ export default function App() {
onCreateItem={handleCreateItem}
items={pickerItems}
itemRenderer={customRender}
createItemRenderer={customCreateItemRender}
selectedItems={selectedItems}
onSelectedItemsChange={(changes) =>
handleSelectedItemsChange(changes.selectedItems)
Expand Down

0 comments on commit abbb2a8

Please sign in to comment.