Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support render props for <Popover/> and <Popconfirm/> #22034

Merged
merged 3 commits into from Mar 10, 2020

Conversation

nossbigg
Copy link
Contributor

@nossbigg nossbigg commented Mar 9, 2020

馃 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

馃敆 Related issue link

#21935

馃挕 Background and solution

Problem:
Current <Popover/> and <Popconfirm/> doesn't support render props.

Solution:
Add support for render props for <Popover/> and <Popconfirm/>

<Popover content={() => 'some-content'} title={() => 'some-title'} />

<Popconfirm title={() => 'some-title'} />

馃摑 Changelog

Language Changelog
馃嚭馃嚫 English Add render props support for Popover/Popconfirm
馃嚚馃嚦 Chinese Add render props support for Popover/Popconfirm

鈽戯笍 Self Check before Merge

鈿狅笍 Please check all items below before review. 鈿狅笍

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

View rendered components/popover/index.en-US.md
View rendered components/popover/index.zh-CN.md

Copy link

@tests-checker tests-checker bot left a comment

Could you please add tests to make sure this change works as expected?

@nossbigg
Copy link
Contributor Author

@nossbigg nossbigg commented Mar 9, 2020

Mine's a realllllly old version 馃槄, rebasing...

@ant-design-bot
Copy link
Contributor

@ant-design-bot ant-design-bot commented Mar 9, 2020

@codecov
Copy link

@codecov codecov bot commented Mar 9, 2020

Codecov Report

Merging #22034 into feature will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           feature   #22034      +/-   ##
===========================================
- Coverage    97.93%   97.92%   -0.02%     
===========================================
  Files          306      307       +1     
  Lines         7032     7040       +8     
  Branches      1891     1938      +47     
===========================================
+ Hits          6887     6894       +7     
- Misses         145      146       +1
Impacted Files Coverage 螖
components/popconfirm/index.tsx 100% <酶> (酶) 猬嗭笍
components/popover/index.tsx 100% <100%> (酶) 猬嗭笍
components/_util/getRenderPropValue.ts 100% <100%> (酶)
components/breadcrumb/Breadcrumb.tsx 91.93% <0%> (-1.62%) 猬囷笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 125c154...717d19c. Read the comment docs.

@codesandbox-ci
Copy link

@codesandbox-ci codesandbox-ci bot commented Mar 9, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3c0363d:

Sandbox Source
antd reproduction template Configuration

@codesandbox-ci
Copy link

@codesandbox-ci codesandbox-ci bot commented Mar 9, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 717d19c:

Sandbox Source
antd reproduction template Configuration

@nossbigg nossbigg changed the title feat: Support render props for <Popover/> feat: Support render props for <Popover/> and <Popconfirm/> Mar 10, 2020
components/popconfirm/index.en-US.md Outdated Show resolved Hide resolved
afc163
afc163 approved these changes Mar 10, 2020
@afc163 afc163 merged commit 428f743 into ant-design:feature Mar 10, 2020
20 checks passed
@nossbigg
Copy link
Contributor Author

@nossbigg nossbigg commented Mar 10, 2020

@afc163 Thanks for the merge! 馃檪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants