-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2224 from XiaoMi/feature/popover-gutter-gap
feat(popover): 增加设置间距功能
- Loading branch information
Showing
9 changed files
with
80 additions
and
0 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
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,19 @@ | ||
import React from 'react' | ||
import PopConfirm from '../src' | ||
import Button from '@hi-ui/button' | ||
|
||
/** | ||
* @title 设置基于依附元素的间隙偏移量 | ||
*/ | ||
export const GutterGap = () => { | ||
return ( | ||
<> | ||
<h1>Gutter Gap</h1> | ||
<div className="pop-confirm-basic__wrap"> | ||
<PopConfirm title="Delete this item along with the entered content?" gutterGap={30}> | ||
<Button>Trigger</Button> | ||
</PopConfirm> | ||
</div> | ||
</> | ||
) | ||
} |
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
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
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,27 @@ | ||
import React from 'react' | ||
import Popover from '../src' | ||
import Button from '@hi-ui/button' | ||
|
||
/** | ||
* @title 设置基于依附元素的间隙偏移量 | ||
*/ | ||
export const GutterGap = () => { | ||
const title = <span>文字提示</span> | ||
const content = ( | ||
<div> | ||
<div>此处展示 Popover 具体内容</div> | ||
<div>具体内容可以自行渲染</div> | ||
</div> | ||
) | ||
|
||
return ( | ||
<> | ||
<h1>Gutter Gap</h1> | ||
<div className="popover-basic__wrap"> | ||
<Popover title={title} content={content} gutterGap={30} trigger="click"> | ||
<Button>trigger</Button> | ||
</Popover> | ||
</div> | ||
</> | ||
) | ||
} |
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
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
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,19 @@ | ||
import React from 'react' | ||
import Tooltip from '../src' | ||
import Button from '@hi-ui/button' | ||
|
||
/** | ||
* @title 设置基于依附元素的间隙偏移量 | ||
*/ | ||
export const GutterGap = () => { | ||
return ( | ||
<> | ||
<h1>Gutter Gap</h1> | ||
<div className="Tooltip-basic__wrap"> | ||
<Tooltip title="Tooltip Title" gutterGap={30} trigger="hover"> | ||
<Button>trigger</Button> | ||
</Tooltip> | ||
</div> | ||
</> | ||
) | ||
} |
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