Allow creating label without name

This commit is contained in:
Maksim Eltyshev
2019-10-09 18:48:19 +05:00
parent b9d4024957
commit 4911816734
9 changed files with 31 additions and 51 deletions

View File

@@ -43,7 +43,7 @@ const Item = React.memo(({
});
Item.propTypes = {
name: PropTypes.string.isRequired,
name: PropTypes.string,
color: PropTypes.string.isRequired,
isPersisted: PropTypes.bool.isRequired,
isActive: PropTypes.bool.isRequired,
@@ -52,4 +52,8 @@ Item.propTypes = {
onEdit: PropTypes.func.isRequired,
};
Item.defaultProps = {
name: undefined,
};
export default Item;