fix: fix rating selecting
This commit is contained in:
parent
54dc9c243b
commit
e50187dea1
@ -82,7 +82,7 @@ export function ReviewForm() {
|
||||
onChange: (value: number) => void;
|
||||
}) => {
|
||||
return (
|
||||
<div className='flex space-x-1'>
|
||||
<>
|
||||
{[1, 2, 3, 4, 5].map((star) => (
|
||||
<button
|
||||
key={star}
|
||||
@ -90,7 +90,7 @@ export function ReviewForm() {
|
||||
onClick={() => onChange(star)}
|
||||
onMouseEnter={() => setHoveredStar(star)}
|
||||
onMouseLeave={() => setHoveredStar(0)}
|
||||
className='transition-transform hover:scale-110 focus:outline-none'
|
||||
className='cursor-pointer transition-transform hover:scale-110 focus:outline-none'
|
||||
aria-label={`Rate ${star} stars out of 5`}
|
||||
>
|
||||
<Star
|
||||
@ -102,7 +102,7 @@ export function ReviewForm() {
|
||||
/>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@ -157,7 +157,7 @@ export function ReviewForm() {
|
||||
name='rating'
|
||||
render={({ field }) => (
|
||||
<FormItem className='space-y-3'>
|
||||
<FormLabel>Ваша оценка</FormLabel>
|
||||
<FormLabel className='block'>Ваша оценка</FormLabel>
|
||||
<FormControl>
|
||||
<StarRating
|
||||
value={field.value}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user