Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
d6330a71
Commit
d6330a71
authored
Apr 27, 2018
by
Nikhil Bhargava
Committed by
陈帅
May 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow toggling to let upward trends be positive (instead of only negative)
- Update prop name to be `reverseColor`
parent
3cfbae3b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
src/components/Trend/index.js
src/components/Trend/index.js
+2
-1
src/components/Trend/index.less
src/components/Trend/index.less
+7
-0
No files found.
src/components/Trend/index.js
View file @
d6330a71
...
...
@@ -3,11 +3,12 @@ import { Icon } from 'antd';
import
classNames
from
'
classnames
'
;
import
styles
from
'
./index.less
'
;
const
Trend
=
({
colorful
=
true
,
flag
,
children
,
className
,
...
rest
})
=>
{
const
Trend
=
({
colorful
=
true
,
reverseColor
=
false
,
flag
,
children
,
className
,
...
rest
})
=>
{
const
classString
=
classNames
(
styles
.
trendItem
,
{
[
styles
.
trendItemGrey
]:
!
colorful
,
[
styles
.
reverseColor
]:
reverseColor
&&
colorful
,
},
className
);
...
...
src/components/Trend/index.less
View file @
d6330a71
...
...
@@ -27,4 +27,11 @@
&.trendItemGrey .down {
color: @text-color;
}
&.reverseColor .up {
color: @green-6;
}
&.reverseColor .down {
color: @red-6;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment