import React, { useMemo, useState } from 'react';
import { Button, Divider, Popover, Segmented } from 'antd';
const text = Title;
const content = (
);
const buttonWidth = 70;
const App: React.FC = () => {
const [showArrow, setShowArrow] = useState(true);
const [arrowAtCenter, setArrowAtCenter] = useState(false);
const mergedArrow = useMemo(() => {
if (arrowAtCenter) return { pointAtCenter: true };
return showArrow;
}, [showArrow, arrowAtCenter]);
return (
{
setShowArrow(val !== 'Hide');
setArrowAtCenter(val === 'Center');
}}
/>
Content
);
};
export default App;