From ec8f082284becca5dad63672beadd6ae6a3777ac Mon Sep 17 00:00:00 2001 From: jim Date: Fri, 18 May 2018 22:58:14 +0800 Subject: [PATCH] add Trend reverseColor doc --- src/components/Trend/demo/basic.md | 2 +- src/components/Trend/demo/reverse.md | 17 +++++++++++++++++ src/components/Trend/index.d.ts | 1 + src/components/Trend/index.md | 1 + 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/components/Trend/demo/reverse.md diff --git a/src/components/Trend/demo/basic.md b/src/components/Trend/demo/basic.md index 82afcdab..63c415dc 100644 --- a/src/components/Trend/demo/basic.md +++ b/src/components/Trend/demo/basic.md @@ -10,7 +10,7 @@ import Trend from 'ant-design-pro/lib/Trend'; ReactDOM.render(
- 12% + 12% 11%
, mountNode); diff --git a/src/components/Trend/demo/reverse.md b/src/components/Trend/demo/reverse.md new file mode 100644 index 00000000..143ed023 --- /dev/null +++ b/src/components/Trend/demo/reverse.md @@ -0,0 +1,17 @@ +--- +order: 0 +title: 颜色反转 +--- + +在数值背后添加一个小图标来标识涨跌情况。 + +````jsx +import Trend from 'ant-design-pro/lib/Trend'; + +ReactDOM.render( +
+ 12% + 11% +
+, mountNode); +```` diff --git a/src/components/Trend/index.d.ts b/src/components/Trend/index.d.ts index fafcb05f..7dc02010 100644 --- a/src/components/Trend/index.d.ts +++ b/src/components/Trend/index.d.ts @@ -4,6 +4,7 @@ export interface ITrendProps { colorful?: boolean; flag: 'up' | 'down'; style?: React.CSSProperties; + reverseColor?: boolean; } export default class Trend extends React.Component {} diff --git a/src/components/Trend/index.md b/src/components/Trend/index.md index 683ed619..eb78b96e 100644 --- a/src/components/Trend/index.md +++ b/src/components/Trend/index.md @@ -19,3 +19,4 @@ order: 14 |----------|------------------------------------------|-------------|-------| | colorful | 是否彩色标记 | Boolean | true | | flag | 上升下降标识:`up|down` | string | - | +| reverseColor | 颜色反转 | Boolean | true | -- GitLab