[ListItem] Make `clickable` prop optional when `onClick` is defined
Make the clickable
prop of the component ListItem
optional if the onClick
prop is defined.
-<ListItem clickable={condition} onClick={handleClick} />
+<ListItem onClick={condition && handleClick} />
clickable
can still be used when onClick
is not defined :
<ListItem clickable component='a' href='...' />
But clickable
will be ignored if onClick
is defined :
<ListItem clickable={false} onClick={handleClick} />
=> will be clickable anyway because onClick
is defined
Edited by Mickaël Bourgier