|
|
@@ -144,8 +144,24 @@ const CircleButton = ({
|
|
|
otherIcon?: string
|
|
|
onClick: () => void
|
|
|
}) => {
|
|
|
+ const [recentlyChanged, setRecentlyChanged] = React.useState(false)
|
|
|
+
|
|
|
+ React.useEffect(() => {
|
|
|
+ setRecentlyChanged(true)
|
|
|
+ const timer = setTimeout(() => {
|
|
|
+ setRecentlyChanged(false)
|
|
|
+ }, 500)
|
|
|
+ return () => clearTimeout(timer)
|
|
|
+ }, [active])
|
|
|
+
|
|
|
return (
|
|
|
- <div data-active={active} style={style} className="tl-circle-button" onMouseDown={onClick}>
|
|
|
+ <div
|
|
|
+ data-active={active}
|
|
|
+ data-recently-changed={recentlyChanged}
|
|
|
+ style={style}
|
|
|
+ className="tl-circle-button"
|
|
|
+ onMouseDown={onClick}
|
|
|
+ >
|
|
|
<div className="tl-circle-button-icons-wrapper" data-icons-count={otherIcon ? 2 : 1}>
|
|
|
{otherIcon && <TablerIcon name={otherIcon} />}
|
|
|
<TablerIcon name={icon} />
|