summaryrefslogtreecommitdiff
path: root/apps/web/src/components/ui/input-with-back.tsx
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2025-09-01 23:02:57 +0200
committerMaze Winther <mazewinther@gmail.com>2025-09-01 23:02:57 +0200
commit42cf851d635e006c8dda11e09d9b52d07d1afcd2 (patch)
treea32942e6234823ba7fac9e67449f5166c82fb48f /apps/web/src/components/ui/input-with-back.tsx
parentc5480d307cd6b959c21aee4f1de7a2c3b9010d7d (diff)
downloadopencut-42cf851d635e006c8dda11e09d9b52d07d1afcd2.tar.gz
disable back animation
Diffstat (limited to 'apps/web/src/components/ui/input-with-back.tsx')
-rw-r--r--apps/web/src/components/ui/input-with-back.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/web/src/components/ui/input-with-back.tsx b/apps/web/src/components/ui/input-with-back.tsx
index ea225c14..cae9f8c9 100644
--- a/apps/web/src/components/ui/input-with-back.tsx
+++ b/apps/web/src/components/ui/input-with-back.tsx
@@ -12,6 +12,7 @@ interface InputWithBackProps {
placeholder?: string;
value?: string;
onChange?: (value: string) => void;
+ disableAnimation?: boolean;
}
export function InputWithBack({
@@ -20,12 +21,13 @@ export function InputWithBack({
placeholder = "Search anything",
value,
onChange,
+ disableAnimation = false,
}: InputWithBackProps) {
const [containerRef, setContainerRef] = useState<HTMLDivElement | null>(null);
const [buttonOffset, setButtonOffset] = useState(-60);
const smoothTransition = {
- duration: 0.35,
+ duration: disableAnimation ? 0 : 0.35,
ease: [0.25, 0.1, 0.25, 1] as const,
};