mirror of
https://github.com/usememos/memos.git
synced 2025-10-10 22:36:21 +08:00
chore: tweak spoiler animation
This commit is contained in:
parent
c6162d3f38
commit
e7bbd850b2
1 changed files with 1 additions and 4 deletions
|
@ -10,10 +10,7 @@ const Spoiler: React.FC<Props> = ({ content }: Props) => {
|
|||
|
||||
return (
|
||||
<span
|
||||
className={classNames(
|
||||
"inline cursor-pointer select-none transition-all",
|
||||
isRevealed ? "bg-gray-100 dark:bg-zinc-700" : "bg-gray-200 dark:bg-zinc-600",
|
||||
)}
|
||||
className={classNames("inline cursor-pointer select-none", isRevealed ? "" : "animate-pulse bg-gray-200 dark:bg-zinc-700")}
|
||||
onClick={() => setIsRevealed(!isRevealed)}
|
||||
>
|
||||
<span className={classNames(isRevealed ? "opacity-100" : "opacity-0")}>{content}</span>
|
||||
|
|
Loading…
Add table
Reference in a new issue