This commit is contained in:
2025-11-09 20:21:46 +01:00
parent bfab2f2cdc
commit 20cf597c5c
15 changed files with 101 additions and 142 deletions
+1 -6
View File
@@ -1,15 +1,10 @@
import React, { useEffect, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
import { ArrowLeftIcon, ArrowRightIcon } from '../ui/icons';
import { clamp } from '../utils/math';
const noop = () => {};
const clamp = (value, min, max) => {
if (value < min) return min;
if (value > max) return max;
return value;
};
const ensureDocumentRoot = () => {
if (typeof document === 'undefined') {
return null;