Web:Common:Add icon in SelectedItem.
This commit is contained in:
parent
55e17eef42
commit
ee43c167cc
@ -32,16 +32,20 @@ const StyledSelectedItem = styled.div`
|
|||||||
|
|
||||||
StyledSelectedItem.defaultProps = { theme: Base };
|
StyledSelectedItem.defaultProps = { theme: Base };
|
||||||
|
|
||||||
const SelectedItem = ({ propKey, label, group, removeSelectedItem }) => {
|
const SelectedItem = ({ propKey, label, group, icon, removeSelectedItem }) => {
|
||||||
const onRemove = () => {
|
const onRemove = () => {
|
||||||
removeSelectedItem(propKey, label, group);
|
removeSelectedItem(propKey, label, group);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledSelectedItem onClick={onRemove}>
|
<StyledSelectedItem onClick={onRemove}>
|
||||||
<Text className={"selected-item_label"} title={label} noSelect>
|
{icon ? (
|
||||||
{label}
|
<img src={icon} />
|
||||||
</Text>
|
) : (
|
||||||
|
<Text className={"selected-item_label"} title={label} noSelect>
|
||||||
|
{label}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
<IconButton
|
<IconButton
|
||||||
iconName={"/static/images/cross.react.svg"}
|
iconName={"/static/images/cross.react.svg"}
|
||||||
size={12}
|
size={12}
|
||||||
|
Loading…
Reference in New Issue
Block a user