mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
disable back animation
This commit is contained in:
@@ -358,6 +358,7 @@ function StickersContentView({ category }: { category: StickerCategory }) {
|
|||||||
}
|
}
|
||||||
value={localSearchQuery}
|
value={localSearchQuery}
|
||||||
onChange={setLocalSearchQuery}
|
onChange={setLocalSearchQuery}
|
||||||
|
disableAnimation={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ interface InputWithBackProps {
|
|||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
value?: string;
|
value?: string;
|
||||||
onChange?: (value: string) => void;
|
onChange?: (value: string) => void;
|
||||||
|
disableAnimation?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function InputWithBack({
|
export function InputWithBack({
|
||||||
@@ -20,12 +21,13 @@ export function InputWithBack({
|
|||||||
placeholder = "Search anything",
|
placeholder = "Search anything",
|
||||||
value,
|
value,
|
||||||
onChange,
|
onChange,
|
||||||
|
disableAnimation = false,
|
||||||
}: InputWithBackProps) {
|
}: InputWithBackProps) {
|
||||||
const [containerRef, setContainerRef] = useState<HTMLDivElement | null>(null);
|
const [containerRef, setContainerRef] = useState<HTMLDivElement | null>(null);
|
||||||
const [buttonOffset, setButtonOffset] = useState(-60);
|
const [buttonOffset, setButtonOffset] = useState(-60);
|
||||||
|
|
||||||
const smoothTransition = {
|
const smoothTransition = {
|
||||||
duration: 0.35,
|
duration: disableAnimation ? 0 : 0.35,
|
||||||
ease: [0.25, 0.1, 0.25, 1] as const,
|
ease: [0.25, 0.1, 0.25, 1] as const,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user