ant-design/components/popconfirm/demo/shift.tsx
lijianan a55195f25b
demo: update Popover & Tooltip & Popconfirm demo (#49815)
* demo: update demo

* fix: fix

* fix: fix

* fix: fix
2024-07-11 10:03:12 +08:00

27 lines
672 B
TypeScript

import React from 'react';
import { Button, Popconfirm } from 'antd';
const style: React.CSSProperties = {
width: '300vw',
height: '300vh',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
};
const App: React.FC = () => {
React.useEffect(() => {
document.documentElement.scrollTop = document.documentElement.clientHeight;
document.documentElement.scrollLeft = document.documentElement.clientWidth;
}, []);
return (
<div style={style}>
<Popconfirm title="Thanks for using antd. Have a nice day !" open>
<Button type="primary">Scroll The Window</Button>
</Popconfirm>
</div>
);
};
export default App;