Skip to content

Commit

Permalink
added removeIcon props (#45)
Browse files Browse the repository at this point in the history
Co-authored-by: Sergey Andreev <sergey.and@okwork.io>
  • Loading branch information
elenik72 and Sergey Andreev authored Feb 22, 2022
1 parent 97ac864 commit 779f73f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cadolabs/sphere-ui",
"version": "4.1.0",
"version": "4.1.1",
"main": "dist/index.js",
"license": "MIT",
"repository": "https://github.com/Cado-Labs/sphere-ui",
Expand Down
2 changes: 2 additions & 0 deletions src/components/MultiSelect/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const MultiSelect = React.forwardRef(({
id = null,
disabled = false,
showClear = false,
removeIcon = false,
}, ref) => {
const multiselectRef = useRef(ref)

Expand Down Expand Up @@ -108,6 +109,7 @@ export const MultiSelect = React.forwardRef(({
selectedItemsLabel={selectedItemsLabel}
showClear={showClear}
display={display}
removeIcon={removeIcon}
/>
)
})
1 change: 1 addition & 0 deletions storybook/i18n/locales/stories/multiselect/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ props:
selectedItemsLabel: Function that gets an item in the value and returns the content for it.
showClear: Displays an icon to clear the value.
display: Used mode to display the selected item. Valid values are 'comma' and 'chip'.
removeIcon: Icon of the remove chip element.
1 change: 1 addition & 0 deletions storybook/stories/form/MultiSelect/multiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const multiSelect = {
{ name: "selectedItemsLabel", type: "string", description: `${I18N_PREFIX}.props.selectedItemsLabel` },
{ name: "showClear", type: "boolean", default: false, description: `${I18N_PREFIX}.props.showClear` },
{ name: "display", type: "string", description: `${I18N_PREFIX}.props.display` },
{ name: "removeIcon", type: "any", default: false, description: `${I18N_PREFIX}.props.removeIcon` },
],
eventDescriptionProps: [
{ name: "onChange", params: onChangeParams, description: `${I18N_PREFIX}.props.onChange` },
Expand Down

0 comments on commit 779f73f

Please sign in to comment.