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: ㊙️ Input passowrd custom icon #23792

Merged
merged 2 commits into from
Apr 30, 2020
Merged

Conversation

afc163
Copy link
Member

@afc163 afc163 commented Apr 30, 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

close #23778

💡 Background and solution

    <Input.Password
      placeholder="input password"
      iconRender={visible => (visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />)}
    />

Also resolve #23484 and #15369

📝 Changelog

Language Changelog
🇺🇸 English Support Input.Password iconRender prop.
🇨🇳 Chinese 新增 Input.Password iconRender 属性用于自定义切换图标

☑️ 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

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Apr 30, 2020

@codesandbox-ci
Copy link

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 68a8cdd:

Sandbox Source
antd reproduction template Configuration

Copy link
Member

@xrkffgg xrkffgg left a comment

Choose a reason for hiding this comment

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

image

点了之后,移开会 保留颜色

@xrkffgg
Copy link
Member

xrkffgg commented Apr 30, 2020

点击后 变色,这是新加的吗? 😂

@afc163
Copy link
Member Author

afc163 commented Apr 30, 2020

点了之后,移开会 保留颜色

仔细看 demo 代码。

<Input.Password placeholder="input password" />
<Input.Password
placeholder="input password"
iconRender={visible => (visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />)}
Copy link
Member Author

Choose a reason for hiding this comment

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

EyeTwoTone 自带颜色。

Copy link
Member

Choose a reason for hiding this comment

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

😅 没注意这块

Choose a reason for hiding this comment

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

IconRender does give an error saying its not a property for <Input.Password>
However the VisibilityToggle does work. Can someone please address this.

@codesandbox-ci
Copy link

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 b3fc7a6:

Sandbox Source
antd reproduction template Configuration

@codecov
Copy link

codecov bot commented Apr 30, 2020

Codecov Report

Merging #23792 into feature will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           feature   #23792   +/-   ##
========================================
  Coverage    98.45%   98.45%           
========================================
  Files          364      364           
  Lines         7259     7261    +2     
  Branches      2022     2024    +2     
========================================
+ Hits          7147     7149    +2     
  Misses         112      112           
Impacted Files Coverage Δ
components/input/Password.tsx 97.61% <100.00%> (+0.11%) ⬆️

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 b66ab37...b3fc7a6. Read the comment docs.

@afc163 afc163 merged commit 081604e into feature Apr 30, 2020
@afc163 afc163 deleted the input-passowrd-custom-icon branch April 30, 2020 13:19
@zombieJ zombieJ mentioned this pull request May 31, 2020
13 tasks
@xrkffgg xrkffgg mentioned this pull request Jul 15, 2020
17 tasks
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.

4 participants