Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
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
7 years ago
by
Nikhil Bhargava
Committed by
陈帅
7 years ago
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
Show 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
);
...
...
This diff is collapsed.
Click to expand it.
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;
}
}
This diff is collapsed.
Click to expand it.
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