import React, { useMemo, useState } from 'react'; import { Button, ConfigProvider, Flex, Popover, Segmented } from 'antd'; import type { PopoverProps } from 'antd'; const text = Title; const buttonWidth = 80; const content = (

Content

Content

); const App: React.FC = () => { const [arrow, setArrow] = useState<'Show' | 'Hide' | 'Center'>('Show'); const mergedArrow = useMemo(() => { if (arrow === 'Hide') { return false; } if (arrow === 'Show') { return true; } return { pointAtCenter: true, }; }, [arrow]); return ( ); }; export default App;