Add Footer component to layout and remove StyleGuidePage
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m19s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m19s
This commit is contained in:
@@ -42,22 +42,26 @@ export default function StarRating({
|
||||
type="button"
|
||||
onClick={() => handleClick(star)}
|
||||
disabled={disabled}
|
||||
onMouseEnter={() => !disabled && setHoverValue(star)}
|
||||
onMouseLeave={() => !disabled && setHoverValue(0)}
|
||||
className={`transition-transform hover:scale-110 disabled:hover:scale-100 disabled:cursor-not-allowed ${sizeClasses[size]}`}
|
||||
style={{
|
||||
color: star <= displayValue ? "var(--accent-color)" : "var(--gray-500)",
|
||||
}}
|
||||
onMouseEnter={(e) => {
|
||||
if (!disabled && star > displayValue) {
|
||||
e.currentTarget.style.color = "var(--gray-400)";
|
||||
if (!disabled) {
|
||||
setHoverValue(star);
|
||||
if (star > displayValue) {
|
||||
e.currentTarget.style.color = "var(--gray-400)";
|
||||
}
|
||||
}
|
||||
}}
|
||||
onMouseLeave={(e) => {
|
||||
if (!disabled && star > displayValue) {
|
||||
e.currentTarget.style.color = "var(--gray-500)";
|
||||
if (!disabled) {
|
||||
setHoverValue(0);
|
||||
if (star > displayValue) {
|
||||
e.currentTarget.style.color = "var(--gray-500)";
|
||||
}
|
||||
}
|
||||
}}
|
||||
className={`transition-transform hover:scale-110 disabled:hover:scale-100 disabled:cursor-not-allowed ${sizeClasses[size]}`}
|
||||
style={{
|
||||
color: star <= displayValue ? "var(--accent-color)" : "var(--gray-500)",
|
||||
}}
|
||||
aria-label={`Noter ${star} étoile${star > 1 ? "s" : ""}`}
|
||||
>
|
||||
★
|
||||
|
||||
Reference in New Issue
Block a user