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’ll 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@nossbigg
Copy link
Contributor Author

nossbigg commented Mar 9, 2020

Mine's a realllllly old version 😅, rebasing...

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Mar 9, 2020

@codecov
Copy link

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 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 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
@afc163 afc163 merged commit 428f743 into ant-design:feature Mar 10, 2020
@nossbigg
Copy link
Contributor Author

@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.

3 participants