-
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 #2667 from XiaoMi/feature/2666(pop-confirm)
feat(pop-confirm): add content api (#2666)
- Loading branch information
Showing
6 changed files
with
52 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,5 @@ | ||
--- | ||
"@hi-ui/hiui": patch | ||
--- | ||
|
||
feat(pop-confirm): add content api |
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,5 @@ | ||
--- | ||
"@hi-ui/pop-confirm": minor | ||
--- | ||
|
||
feat: add content api |
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
25 changes: 25 additions & 0 deletions
25
packages/ui/pop-confirm/stories/custom-content.stories.tsx
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,25 @@ | ||
import Button from '@hi-ui/button' | ||
import React from 'react' | ||
import PopConfirm from '../src' | ||
|
||
/** | ||
* @title 自定义内容 | ||
*/ | ||
export const CustomContent = () => { | ||
return ( | ||
<> | ||
<h1>CustomContent</h1> | ||
<div className="pop-confirm-basic__wrap"> | ||
<PopConfirm | ||
title={ | ||
<div style={{ whiteSpace: 'normal' }}>很长的通知标题很长的通知标题很长的通知标题</div> | ||
} | ||
content={<div>这是一段很长的内容这是一段很长的内容这是一段很长的内容</div>} | ||
style={{ maxWidth: 300 }} | ||
> | ||
<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