mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-11 13:59:11 +08:00
2cdf586291
* chore: fix lint * chore: fix lint * test: fix 16 * fix: lint
30 lines
722 B
TypeScript
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;
|