fix(ui): properly hide indicator
This commit is contained in:
@@ -165,18 +165,27 @@ export const DatePicker = (props) => {
|
||||
props.setDate(new Date());
|
||||
}}
|
||||
>
|
||||
<AnimatePresence>
|
||||
{props.indicator && (
|
||||
<motion.span
|
||||
className={
|
||||
"block min-w-2 min-h-2 rounded-full mx-1 transition-colors" +
|
||||
(props.indicator
|
||||
? props.pink
|
||||
(props.pink
|
||||
? " bg-pink-500 animate-pulse"
|
||||
: " bg-zinc-300 animate-pulse"
|
||||
: " bg-transparent")
|
||||
: " bg-zinc-300 animate-pulse")
|
||||
}
|
||||
variants={{
|
||||
a: { opacity: 0 },
|
||||
b: { opacity: 1 },
|
||||
}}
|
||||
initial="a"
|
||||
animate="b"
|
||||
exit="a"
|
||||
layoutId="datepicker_indicator"
|
||||
layout="position"
|
||||
/>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
<motion.span
|
||||
layoutId="datepicker_date"
|
||||
layout="position"
|
||||
|
||||
Reference in New Issue
Block a user