New: Increase clickable area of artist select in poster/overview

(cherry picked from commit 57a64b056a51ff539f5152d194689b4e2c693beb)

Closes #3366
This commit is contained in:
Mark McDowall 2023-02-13 17:26:32 -08:00 committed by Bogdan
parent 77cfd19c43
commit 8364cba12f
3 changed files with 32 additions and 27 deletions

View File

@ -1,36 +1,38 @@
.checkButton {
position: absolute;
top: 0;
left: 0;
z-index: 3;
width: 36px;
height: 36px;
}
.checkContainer { .checkContainer {
position: absolute; position: absolute;
top: 10px; top: 8px;
left: 10px; left: 8px;
z-index: 3;
width: 18px; width: 18px;
height: 18px; height: 18px;
border-radius: 50%; border-radius: 50%;
background-color: var(--defaultColor); background-color: var(--defaultColor);
} }
.icon {
position: absolute;
top: -1px;
left: -1px;
}
.selected { .selected {
composes: icon;
color: var(--lidarrGreen); color: var(--lidarrGreen);
&:hover {
color: var(--white);
}
} }
.unselected { .unselected {
composes: icon;
color: var(--white); color: var(--white);
}
.checkButton {
&:hover { &:hover {
color: var(--lidarrGreen); .selected {
color: var(--white);
}
.unselected {
color: var(--lidarrGreen);
}
} }
} }

View File

@ -1,8 +1,8 @@
// This file is automatically generated. // This file is automatically generated.
// Please do not change this file! // Please do not change this file!
interface CssExports { interface CssExports {
'checkButton': string;
'checkContainer': string; 'checkContainer': string;
'icon': string;
'selected': string; 'selected': string;
'unselected': string; 'unselected': string;
} }

View File

@ -1,6 +1,7 @@
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
import { useSelect } from 'App/SelectContext'; import { useSelect } from 'App/SelectContext';
import IconButton from 'Components/Link/IconButton'; import Icon from 'Components/Icon';
import Link from 'Components/Link/Link';
import { icons } from 'Helpers/Props'; import { icons } from 'Helpers/Props';
import styles from './ArtistIndexPosterSelect.css'; import styles from './ArtistIndexPosterSelect.css';
@ -28,13 +29,15 @@ function ArtistIndexPosterSelect(props: ArtistIndexPosterSelectProps) {
); );
return ( return (
<IconButton <Link className={styles.checkButton} onPress={onSelectPress}>
className={styles.checkContainer} <span className={styles.checkContainer}>
iconClassName={isSelected ? styles.selected : styles.unselected} <Icon
name={isSelected ? icons.CHECK_CIRCLE : icons.CIRCLE_OUTLINE} className={isSelected ? styles.selected : styles.unselected}
size={20} name={isSelected ? icons.CHECK_CIRCLE : icons.CIRCLE_OUTLINE}
onPress={onSelectPress} size={20}
/> />
</span>
</Link>
); );
} }