From 0af71de17215c12f76034a45d3bcfdd2f29cdb03 Mon Sep 17 00:00:00 2001 From: Dreamacro <305009791@qq.com> Date: Sun, 23 Sep 2018 21:18:17 +0800 Subject: [PATCH] Chore: update Proxies directory structure --- src/components/index.ts | 1 - src/containers/Logs/index.tsx | 9 ++++++++- src/containers/Logs/style.scss | 3 +++ src/{components => containers/Proxies}/Proxy/index.tsx | 4 +++- src/{components => containers/Proxies}/Proxy/style.scss | 0 src/containers/Proxies/index.tsx | 3 ++- src/containers/Proxies/style.scss | 6 +----- src/styles/common.scss | 1 + 8 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 src/containers/Logs/style.scss rename src/{components => containers/Proxies}/Proxy/index.tsx (91%) rename src/{components => containers/Proxies}/Proxy/style.scss (100%) diff --git a/src/components/index.ts b/src/components/index.ts index 41e4e0c..99db18f 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -1,5 +1,4 @@ export * from './Header' export * from './Icon' -export * from './Proxy' export * from './Switch' export * from './Card' diff --git a/src/containers/Logs/index.tsx b/src/containers/Logs/index.tsx index e8fcabe..be9cf49 100644 --- a/src/containers/Logs/index.tsx +++ b/src/containers/Logs/index.tsx @@ -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 ( +
+
+ +
+ ) } } diff --git a/src/containers/Logs/style.scss b/src/containers/Logs/style.scss new file mode 100644 index 0000000..b7ba969 --- /dev/null +++ b/src/containers/Logs/style.scss @@ -0,0 +1,3 @@ +.logs-card { + margin-top: 20px; +} diff --git a/src/components/Proxy/index.tsx b/src/containers/Proxies/Proxy/index.tsx similarity index 91% rename from src/components/Proxy/index.tsx rename to src/containers/Proxies/Proxy/index.tsx index 92ad7a4..8b374fb 100644 --- a/src/components/Proxy/index.tsx +++ b/src/containers/Proxies/Proxy/index.tsx @@ -16,7 +16,7 @@ interface ProxyProps extends BaseComponentProps { name: string } -export const Proxy: React.SFC = props => { +const Proxy: React.SFC = props => { const { type, name, className } = props const icon = iconMapping[type] return ( @@ -26,3 +26,5 @@ export const Proxy: React.SFC = props => { ) } + +export default Proxy diff --git a/src/components/Proxy/style.scss b/src/containers/Proxies/Proxy/style.scss similarity index 100% rename from src/components/Proxy/style.scss rename to src/containers/Proxies/Proxy/style.scss diff --git a/src/containers/Proxies/index.tsx b/src/containers/Proxies/index.tsx index 5cec9b6..1b8412b 100644 --- a/src/containers/Proxies/index.tsx +++ b/src/containers/Proxies/index.tsx @@ -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<{}, {}> { diff --git a/src/containers/Proxies/style.scss b/src/containers/Proxies/style.scss index 29ee007..73c3649 100644 --- a/src/containers/Proxies/style.scss +++ b/src/containers/Proxies/style.scss @@ -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; } } diff --git a/src/styles/common.scss b/src/styles/common.scss index 30a6317..9f16f68 100644 --- a/src/styles/common.scss +++ b/src/styles/common.scss @@ -28,6 +28,7 @@ body { .page-container { width: 100%; + margin-top: 20px; } .page {