mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 14:01:56 +08:00
Add: component <Card>
This commit is contained in:
parent
c9c0ecd37f
commit
5cf06baafc
15
src/components/Card/index.tsx
Normal file
15
src/components/Card/index.tsx
Normal 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>
|
||||
)
|
||||
}
|
8
src/components/Card/style.scss
Normal file
8
src/components/Card/style.scss
Normal 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;
|
||||
}
|
@ -2,3 +2,4 @@ export * from './Header'
|
||||
export * from './Icon'
|
||||
export * from './Proxy'
|
||||
export * from './Switch'
|
||||
export * from './Card'
|
||||
|
Loading…
x
Reference in New Issue
Block a user