demo: update Popover demos (#45598)

Signed-off-by: afc163 <afc163@gmail.com>
This commit is contained in:
afc163 2023-10-31 20:58:01 +08:00 committed by GitHub
parent 768504d83f
commit c1891d8d3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,46 +20,46 @@ const App: React.FC = () => (
>
<div className="demo">
<div style={{ marginInlineStart: buttonWidth + 4, whiteSpace: 'nowrap' }}>
<Popover placement="topLeft" title={text} content={content} trigger="click">
<Popover placement="topLeft" title={text} content={content}>
<Button>TL</Button>
</Popover>
<Popover placement="top" title={text} content={content} trigger="click">
<Popover placement="top" title={text} content={content}>
<Button>Top</Button>
</Popover>
<Popover placement="topRight" title={text} content={content} trigger="click">
<Popover placement="topRight" title={text} content={content}>
<Button>TR</Button>
</Popover>
</div>
<div style={{ width: buttonWidth, float: 'inline-start' }}>
<Popover placement="leftTop" title={text} content={content} trigger="click">
<Popover placement="leftTop" title={text} content={content}>
<Button>LT</Button>
</Popover>
<Popover placement="left" title={text} content={content} trigger="click">
<Popover placement="left" title={text} content={content}>
<Button>Left</Button>
</Popover>
<Popover placement="leftBottom" title={text} content={content} trigger="click">
<Popover placement="leftBottom" title={text} content={content}>
<Button>LB</Button>
</Popover>
</div>
<div style={{ width: buttonWidth, marginInlineStart: buttonWidth * 4 + 24 }}>
<Popover placement="rightTop" title={text} content={content} trigger="click">
<Popover placement="rightTop" title={text} content={content}>
<Button>RT</Button>
</Popover>
<Popover placement="right" title={text} content={content} trigger="click">
<Popover placement="right" title={text} content={content}>
<Button>Right</Button>
</Popover>
<Popover placement="rightBottom" title={text} content={content} trigger="click">
<Popover placement="rightBottom" title={text} content={content}>
<Button>RB</Button>
</Popover>
</div>
<div style={{ marginInlineStart: buttonWidth, clear: 'both', whiteSpace: 'nowrap' }}>
<Popover placement="bottomLeft" title={text} content={content} trigger="click">
<Popover placement="bottomLeft" title={text} content={content}>
<Button>BL</Button>
</Popover>
<Popover placement="bottom" title={text} content={content} trigger="click">
<Popover placement="bottom" title={text} content={content}>
<Button>Bottom</Button>
</Popover>
<Popover placement="bottomRight" title={text} content={content} trigger="click">
<Popover placement="bottomRight" title={text} content={content}>
<Button>BR</Button>
</Popover>
</div>