From 2c02ec839e8191b14982244555b501f7ef1cbf3c Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sat, 23 Nov 2019 11:58:07 +0200 Subject: [PATCH] List: don't set the pointer cursor for non-clickable items. --- src/widgets/List.css | 1 - src/widgets/List.tsx | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/widgets/List.css b/src/widgets/List.css index 2101b4c..8bc9cec 100644 --- a/src/widgets/List.css +++ b/src/widgets/List.css @@ -42,7 +42,6 @@ .ListItem-Item:hover { background-color: rgba(0, 0, 0, 0.1); - cursor: pointer; } .ListItem-inset { diff --git a/src/widgets/List.tsx b/src/widgets/List.tsx index 696a915..fe5e93b 100644 --- a/src/widgets/List.tsx +++ b/src/widgets/List.tsx @@ -80,6 +80,7 @@ export const ListItem = React.memo((_props: any) => { primaryText, secondaryText, children, + style, ...props } = _props; @@ -101,8 +102,11 @@ export const ListItem = React.memo((_props: any) => { ); } + const pressedStyle = (_props.onClick) ? { cursor: 'pointer' } : undefined; + return ( {leftIconHolder}