mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 14:01:56 +08:00
Update: merge master
This commit is contained in:
commit
7b2f93b872
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;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
export * from './Header'
|
||||
export * from './Icon'
|
||||
export * from './Proxy'
|
||||
export * from './Switch'
|
||||
export * from './Card'
|
||||
|
@ -1,7 +1,14 @@
|
||||
import * as React from 'react'
|
||||
import { Card, Header } from '@components'
|
||||
import './style.scss'
|
||||
|
||||
export default class Logs extends React.Component<{}, {}> {
|
||||
render () {
|
||||
return 'Logs'
|
||||
return (
|
||||
<div className="page">
|
||||
<Header title="日志" />
|
||||
<Card className="logs-card" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
3
src/containers/Logs/style.scss
Normal file
3
src/containers/Logs/style.scss
Normal file
@ -0,0 +1,3 @@
|
||||
.logs-card {
|
||||
margin-top: 20px;
|
||||
}
|
@ -16,7 +16,7 @@ interface ProxyProps extends BaseComponentProps {
|
||||
name: string
|
||||
}
|
||||
|
||||
export const Proxy: React.SFC<ProxyProps> = props => {
|
||||
const Proxy: React.SFC<ProxyProps> = props => {
|
||||
const { type, name, className } = props
|
||||
const icon = iconMapping[type]
|
||||
return (
|
||||
@ -26,3 +26,5 @@ export const Proxy: React.SFC<ProxyProps> = props => {
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Proxy
|
@ -1,7 +1,8 @@
|
||||
import * as React from 'react'
|
||||
import { Header, Icon, Proxy } from '@components'
|
||||
import { Header, Icon } from '@components'
|
||||
import { ProxyType } from '@models'
|
||||
|
||||
import Proxy from './Proxy'
|
||||
import './style.scss'
|
||||
|
||||
export class Proxies extends React.Component<{}, {}> {
|
||||
|
@ -1,15 +1,11 @@
|
||||
@import '~@styles/variables';
|
||||
|
||||
.proxies-container {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.proxies-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
list-style: none;
|
||||
|
||||
li {
|
||||
margin: 20px 15px 0 0;
|
||||
margin: 20px 15px 20px 0;
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ body {
|
||||
|
||||
.page-container {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.page {
|
||||
|
Loading…
x
Reference in New Issue
Block a user