mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-09 21:38:54 +08:00
33 lines
731 B
TypeScript
33 lines
731 B
TypeScript
|
import React from 'react';
|
||
|
import { Button, Tooltip } from 'antd';
|
||
|
|
||
|
const wrapStyles: React.CSSProperties = {
|
||
|
overflow: 'hidden',
|
||
|
position: 'relative',
|
||
|
padding: '24px',
|
||
|
border: '1px solid #e9e9e9',
|
||
|
};
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<div style={wrapStyles}>
|
||
|
<Tooltip
|
||
|
placement="left"
|
||
|
title="Prompt Text"
|
||
|
getPopupContainer={trigger => trigger.parentElement!}
|
||
|
>
|
||
|
<Button>Adjust automatically / 自动调整</Button>
|
||
|
</Tooltip>
|
||
|
<br />
|
||
|
<Tooltip
|
||
|
placement="left"
|
||
|
title="Prompt Text"
|
||
|
getPopupContainer={trigger => trigger.parentElement!}
|
||
|
autoAdjustOverflow={false}
|
||
|
>
|
||
|
<Button>Ignore / 不处理</Button>
|
||
|
</Tooltip>
|
||
|
</div>
|
||
|
);
|
||
|
|
||
|
export default App;
|