This commit is contained in:
zuiidea
2016-11-24 23:58:27 +08:00
parent 2320fe5af5
commit 4b55dbccb9
5 changed files with 15 additions and 21 deletions
+3 -3
View File
@@ -1,17 +1,17 @@
import React, { PropTypes } from 'react'
import { Icon } from 'antd'
import { Icon, Card } from 'antd'
import styles from './numberCard.less'
function NumberCard(props) {
const { icon, color, title, number } = props
return (
<div className={styles.numberCard}>
<Card className={styles.numberCard} bordered={false} bodyStyle={{padding:0}}>
<Icon className={styles.iconWarp} style={{ color }} type={icon} />
<div className={styles.content}>
<p className={styles.title}>{title || 'No Title'}</p>
<p className={styles.number}>{number || '10,000'}</p>
</div>
</div>
</Card>
)
}
-7
View File
@@ -1,16 +1,9 @@
@import "../vars.less";
.numberCard{
box-shadow: @shadow-1;
padding: 32px;
font-family: monospace;
background-color: #fff;
margin-bottom: 24px;
cursor: pointer;
transition: @transition-ease-in;
&:hover{
box-shadow: @shadow-2;
transform: translateY(-2px);
}
.iconWarp{
font-size: 54px;
float: left;
+5 -7
View File
@@ -1,11 +1,9 @@
@import "./vars.less";
:global{
.ant-card{
box-shadow: @shadow-1;
transition: @transition-ease-in;
&:hover{
box-shadow: @shadow-2;
transform: translateY(-2px);
}
.ant-modal-mask{
background-color: rgba(55, 55, 55, 0.2);
}
.ant-modal-content{
box-shadow: none;
}
}