mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 20:19:44 +08:00
a55195f25b
* demo: update demo * fix: fix * fix: fix * fix: fix
27 lines
663 B
TypeScript
27 lines
663 B
TypeScript
import React from 'react';
|
|
import { Button, Tooltip } 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}>
|
|
<Tooltip title="Thanks for using antd. Have a nice day !" open>
|
|
<Button type="primary">Scroll The Window</Button>
|
|
</Tooltip>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default App;
|