diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2025-08-06 21:52:21 +0200 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2025-08-06 21:52:21 +0200 |
| commit | ebfb7c1c8bc0a9ec50bde72eb9a0859c6e5dcee5 (patch) | |
| tree | 35353c15726d7d036907df731b00d390c1d1f538 /src/frontend/app/components/PullToRefresh.tsx | |
| parent | 5cc27f852b02446659e0ab85305916c9f5e5a5f0 (diff) | |
Fix this fucking pile of steaming garbage
Diffstat (limited to 'src/frontend/app/components/PullToRefresh.tsx')
| -rw-r--r-- | src/frontend/app/components/PullToRefresh.tsx | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/frontend/app/components/PullToRefresh.tsx b/src/frontend/app/components/PullToRefresh.tsx index 47a6f03..e69de29 100644 --- a/src/frontend/app/components/PullToRefresh.tsx +++ b/src/frontend/app/components/PullToRefresh.tsx @@ -1,53 +0,0 @@ -import { type ReactNode } from "react"; -import { RotateCcw } from "lucide-react"; -import "./PullToRefresh.css"; - -interface PullToRefreshIndicatorProps { - pullDistance: number; - isRefreshing: boolean; - canRefresh: boolean; - children: ReactNode; -} - -export function PullToRefreshIndicator({ - pullDistance, - isRefreshing, - canRefresh, - children, -}: PullToRefreshIndicatorProps) { - const opacity = Math.min(pullDistance / 60, 1); - const rotation = isRefreshing ? 360 : pullDistance * 4; - const scale = Math.min(0.5 + (pullDistance / 120), 1); - - return ( - <div className="pull-to-refresh-container"> - <div - className="pull-to-refresh-indicator" - style={{ - transform: `translateY(${Math.min(pullDistance, 80)}px)`, - opacity: opacity, - }} - > - <div - className={`pull-to-refresh-icon ${isRefreshing ? 'spinning' : ''} ${canRefresh ? 'ready' : ''}`} - style={{ - transform: `rotate(${rotation}deg) scale(${scale})`, - }} - > - <RotateCcw size={24} /> - </div> - <div className="pull-to-refresh-text"> - {isRefreshing ? "Actualizando..." : canRefresh ? "Suelta para actualizar" : "Arrastra para actualizar"} - </div> - </div> - <div - className="pull-to-refresh-content" - style={{ - transform: `translateY(${Math.min(pullDistance * 0.5, 40)}px)`, - }} - > - {children} - </div> - </div> - ); -} |
