Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
fix: degrade antd due to parcel bug
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkamyshev committed May 27, 2020
1 parent 59f8cdc commit 9dccd0d
Show file tree
Hide file tree
Showing 3 changed files with 601 additions and 302 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
"release": "standard-version"
},
"dependencies": {
"@ant-design/icons": "^4.1.0",
"@samokat/abstract-env": "^1.1.1",
"@samokat/parcel-plugin-real-env": "^1.0.0",
"antd": "^4.2.5",
"antd": "^3.15.0",
"axios": "^0.18.1",
"chart.js": "^2.7.3",
"class-transformer": "^0.2.3",
Expand Down
7 changes: 3 additions & 4 deletions src/ui/components/chart/stat/Stat.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Statistic } from 'antd';
import { ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons';
import { Statistic, Icon } from 'antd';
import React from 'react';

interface Props {
Expand All @@ -21,15 +20,15 @@ export const Stat = ({
const green = !decreaseIsGood ? positive : !positive;

const color = green ? '#3f8600' : '#cf1322';
const Icon = positive ? ArrowUpOutlined : ArrowDownOutlined;
const iconType = positive ? 'arrow-up' : 'arrow-down';

return (
<Statistic
title={title}
value={Math.abs(value)}
precision={2}
valueStyle={{ color }}
prefix={<Icon />}
prefix={<Icon type={iconType} />}
suffix={suffix}
/>
);
Expand Down
Loading

0 comments on commit 9dccd0d

Please sign in to comment.