Browse Source

Add tooltips to card overlay buttons

- Add to queue
- Favorite
- View in modal
master
jeffvli 3 years ago
committed by Jeff
parent
commit
c6a3d3ccce
  1. 11
      src/components/card/Card.tsx

11
src/components/card/Card.tsx

@ -148,29 +148,40 @@ const Card = ({
icon={<Icon icon="play" />}
onClick={handlePlayClick}
/>
<CustomTooltip text="Add to queue (later)">
<AppendOverlayButton
onClick={() => handlePlayAppend('later')}
size={size <= 160 ? 'xs' : 'sm'}
icon={<Icon icon="plus" />}
/>
</CustomTooltip>
<CustomTooltip text="Add to queue (next)">
<AppendNextOverlayButton
onClick={() => handlePlayAppend('next')}
size={size <= 160 ? 'xs' : 'sm'}
icon={<Icon icon="plus-circle" />}
/>
</CustomTooltip>
{playClick.type !== 'playlist' && (
<CustomTooltip text="Toggle favorite">
<FavoriteOverlayButton
onClick={() => handleFavorite(rest.details)}
size={size <= 160 ? 'xs' : 'sm'}
icon={<Icon icon={rest.details.starred ? 'heart' : 'heart-o'} />}
/>
</CustomTooltip>
)}
{!rest.isModal && (
<CustomTooltip text="View in modal">
<ModalViewOverlayButton
size={size <= 160 ? 'xs' : 'sm'}
icon={<Icon icon="external-link" />}
onClick={handleOpenModal}
/>
</CustomTooltip>
)}
</>
)}

Loading…
Cancel
Save