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

Timeline 不支持自定义颜色 #2479

Closed
yukrain opened this issue Jul 23, 2016 · 2 comments
Closed

Timeline 不支持自定义颜色 #2479

yukrain opened this issue Jul 23, 2016 · 2 comments

Comments

@yukrain
Copy link

yukrain commented Jul 23, 2016

  • antd 版本:1.6.5

    <Timeline.Item color="green">创建服务现场 2015-09-01</Timeline.Item>
    color 参数貌似不支持自定义色值

源代码这里好像也只支持三种颜色
https://github.com/ant-design/ant-design/blob/master/components/timeline/TimelineItem.tsx#L43

<div className={dotClassName} style={{ color: /blue|red|green/.test(color) ? null : color }}>{dot} </div>

@yeliex
Copy link
Contributor

yeliex commented Jul 24, 2016

color : 指定圆圈颜色 blue, red, green,或自定义的色值
style={{ color: /blue|red|green/.test(color) ? null : color }}的意思是 如果color的参数是这三种颜色 那么使用样式表中的颜色 否则使用你输入的色值

afc163 added a commit that referenced this issue Jul 24, 2016
@afc163 afc163 closed this as completed Jul 24, 2016
@lock
Copy link

lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants