List: don't set the pointer cursor for non-clickable items.

master
Tom Hacohen 5 years ago
parent e407976e58
commit 2c02ec839e

@ -42,7 +42,6 @@
.ListItem-Item:hover { .ListItem-Item:hover {
background-color: rgba(0, 0, 0, 0.1); background-color: rgba(0, 0, 0, 0.1);
cursor: pointer;
} }
.ListItem-inset { .ListItem-inset {

@ -80,6 +80,7 @@ export const ListItem = React.memo((_props: any) => {
primaryText, primaryText,
secondaryText, secondaryText,
children, children,
style,
...props ...props
} = _props; } = _props;
@ -101,8 +102,11 @@ export const ListItem = React.memo((_props: any) => {
); );
} }
const pressedStyle = (_props.onClick) ? { cursor: 'pointer' } : undefined;
return ( return (
<ListItemRaw <ListItemRaw
style={{ ...pressedStyle, ...style }}
{...props} {...props}
> >
{leftIconHolder} {leftIconHolder}

Loading…
Cancel
Save