-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: drag event lose when drag over iframe
- Loading branch information
Showing
2 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from 'react'; | ||
import { DragPanel } from '@music163/tango-ui'; | ||
import { Box, Text } from 'coral-system'; | ||
import { Button } from 'antd'; | ||
|
||
export default { | ||
title: 'UI/DragPanel', | ||
}; | ||
|
||
export function Basic() { | ||
return ( | ||
<DragPanel | ||
title="弹层标题" | ||
extra="右上角内容" | ||
width={350} | ||
body={<Box p="m">内容</Box>} | ||
footer={<Text>底部信息</Text>} | ||
> | ||
<Button>点击唤起浮层</Button> | ||
</DragPanel> | ||
); | ||
} | ||
|
||
export function FooterCustom() { | ||
return ( | ||
<DragPanel | ||
title="弹层标题" | ||
extra="右上角内容" | ||
width={350} | ||
body={<Box p="m">内容</Box>} | ||
footer={(close) => ( | ||
<Box display="flex" justifyContent="space-between"> | ||
<Text>底部信息</Text> | ||
<Button size="small" onClick={() => close()}> | ||
点此关闭 | ||
</Button> | ||
</Box> | ||
)} | ||
> | ||
<Button>点击唤起浮层</Button> | ||
</DragPanel> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters