ant-design/components/tooltip/demo/shift.tsx

30 lines
715 B
TypeScript
Raw Normal View History

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',
}}
>
2024-04-25 17:31:07 +08:00
<Tooltip title="Thanks for using antd. Have a nice day!" trigger="click" open>
<Button>Scroll The Window</Button>
</Tooltip>
</div>
</div>
);
};
export default App;