import React, { useMemo, useState } from 'react'; import { Button, Divider, Popover, Segmented } from 'antd'; const text = Title; const content = (

Content

Content

); const buttonWidth = 70; const App: React.FC = () => { const [showArrow, setShowArrow] = useState(true); const [arrowAtCenter, setArrowAtCenter] = useState(false); const mergedArrow = useMemo(() => { if (arrowAtCenter) return { arrowPointAtCenter: true }; return showArrow; }, [showArrow, arrowAtCenter]); return (
{ setShowArrow(val !== 'Hide'); setArrowAtCenter(val === 'Center'); }} /> Content
); }; export default App;