ant-design/components/tooltip/demo/shift.tsx
二货爱吃白萝卜 2cdf586291
chore: fix lint (#43873)
* chore: fix lint

* chore: fix lint

* test: fix 16

* fix: lint
2023-07-28 16:17:43 +08:00

30 lines
722 B
TypeScript

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