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

Badge support customize color #15764

Merged
merged 4 commits into from Mar 31, 2019

Conversation

Projects
None yet
3 participants
@zombieJ
Copy link
Member

commented Mar 31, 2019

🤔 This is a ...

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

👻 What's the background?

ref: #15734

💡 Solution

Add new color prop:

 <Badge color="#f50" text="#f50" />
 <Badge color="pink" text="pink" />

📝 Changelog description

  1. Badge support customize color

  2. Badge 支持自定义颜色

☑️ Self Check before Merge

  • 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

zombieJ added some commits Mar 31, 2019

@zombieJ zombieJ requested review from afc163 and ztplz Mar 31, 2019

@codecov

This comment has been minimized.

Copy link

commented Mar 31, 2019

Codecov Report

Merging #15764 into feature will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           feature   #15764      +/-   ##
===========================================
+ Coverage    95.04%   95.05%   +<.01%     
===========================================
  Files          250      251       +1     
  Lines         6665     6675      +10     
  Branches      1947     1935      -12     
===========================================
+ Hits          6335     6345      +10     
  Misses         329      329              
  Partials         1        1
Impacted Files Coverage Δ
components/_util/colors.ts 100% <100%> (ø)
components/tag/index.tsx 100% <100%> (ø) ⬆️
components/badge/index.tsx 100% <100%> (ø) ⬆️

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 c91d7d1...b1d29a2. Read the comment docs.

@netlify

This comment has been minimized.

Copy link

commented Mar 31, 2019

Deploy preview for ant-design ready!

Built with commit b1d29a2

https://deploy-preview-15764--ant-design.netlify.com

import Wave from '../_util/wave';

export { CheckableTagProps } from './CheckableTag';

export interface TagProps extends React.HTMLAttributes<HTMLDivElement> {
prefixCls?: string;
className?: string;
color?: string;
color?: PresetColorType | string;

This comment has been minimized.

Copy link
@ztplz

ztplz Mar 31, 2019

Collaborator

其实就是string 你这么写PresetColorType已经没用了

@ztplz

This comment has been minimized.

Copy link
Collaborator

commented Mar 31, 2019

怪不得我总觉得哪里不对劲 你改的tag的代码 但是你标题是badge?

@zombieJ

This comment has been minimized.

Copy link
Member Author

commented Mar 31, 2019

@ztplz 是 Badge。Tag 里也有颜色。这边抽出来统一放 _util/colors 里了。

@afc163

afc163 approved these changes Mar 31, 2019

@zombieJ zombieJ merged commit 75cd91a into feature Mar 31, 2019

28 of 30 checks passed

Header rules No header rules processed
Details
Pages changed 12 new files uploaded
Details
Auto Assign Auto Assign
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
LGTM analysis: JavaScript No new or fixed alerts
Details
License Compliance All checks passed.
Details
Mixed content No mixed content detected
Details
Redirect rules 18 redirect rules processed
Details
WIP Ready for review
Details
ant-design.ant-design #ant design succeeded
Details
buildsize No change
Details
ci/circleci: compile Your tests passed on CircleCI!
Details
ci/circleci: dist Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_dist Your tests passed on CircleCI!
Details
ci/circleci: test_dist_15 Your tests passed on CircleCI!
Details
ci/circleci: test_dom Your tests passed on CircleCI!
Details
ci/circleci: test_dom_15 Your tests passed on CircleCI!
Details
ci/circleci: test_es Your tests passed on CircleCI!
Details
ci/circleci: test_es_15 Your tests passed on CircleCI!
Details
ci/circleci: test_lib Your tests passed on CircleCI!
Details
ci/circleci: test_lib_15 Your tests passed on CircleCI!
Details
ci/circleci: test_node Your tests passed on CircleCI!
Details
ci/circleci: test_node_15 Your tests passed on CircleCI!
Details
codebeat Target branch is not tracked
Details
codecov/patch 100% of diff hit (target 95.04%)
Details
codecov/project 95.05% (+<.01%) compared to c91d7d1
Details
deploy/netlify Deploy preview ready!
Details
security/snyk - package.json (paranoidjk) No manifest changes detected

@delete-merged-branch delete-merged-branch bot deleted the badge-color branch Mar 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.