import React, { useRef, useState } from 'react'; import { Button, Col, Row, Slider, Space, Tour, Typography } from 'antd'; import type { TourProps } from 'antd'; const { Text } = Typography; const App: React.FC = () => { const tourNodeRef = useRef(null); const [radius, setRadius] = useState(8); const [offsetX, setOffsetX] = useState(2); const [offsetY, setOffsetY] = useState(2); const [offset, setOffset] = useState(2); const [open, setOpen] = useState(false); const [offsetDirection, setOffsetDirection] = useState<'both' | 'individual'>('individual'); const steps: TourProps['steps'] = [ { title: 'Upload File', description: 'Put your files here.', cover: ( ), target: () => tourNodeRef.current, }, ]; const offsetGap = offsetDirection === 'both' ? { offset } : { offset: [offsetX, offsetY] as [number, number], }; return (