Add: component <Card>

This commit is contained in:
Dreamacro 2018-09-23 21:17:33 +08:00
parent c9c0ecd37f
commit 5cf06baafc
3 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,15 @@
import * as React from 'react'
import { BaseComponentProps } from '@models/BaseProps'
import classnames from 'classnames'
import './style.scss'
interface CardProps extends BaseComponentProps {}
export const Card: React.SFC<CardProps> = props => {
const { className, style, children } = props
return (
<div className={classnames('card', className)} style={style}>
{ children }
</div>
)
}

View File

@ -0,0 +1,8 @@
@import '~@styles/variables';
.card {
padding: 15px;
box-shadow: 0 0 20px rgba($color-primary-dark, 0.2);
background-color: #fff;
border-radius: 4px;
}

View File

@ -2,3 +2,4 @@ export * from './Header'
export * from './Icon'
export * from './Proxy'
export * from './Switch'
export * from './Card'