Improve: optimize proxies page style

This commit is contained in:
jas0ncn 2018-09-24 22:40:36 +08:00
parent e5d2801a62
commit 582d82868d
6 changed files with 9 additions and 13 deletions

View File

@ -1,5 +1 @@
@import '~@styles/common'; @import '~@styles/common';
.page-container {
width: 545px;
}

View File

@ -16,7 +16,7 @@ interface ProxyProps extends BaseComponentProps {
name: string name: string
} }
const Proxy: React.SFC<ProxyProps> = props => { export const Proxy: React.SFC<ProxyProps> = props => {
const { type, name, className } = props const { type, name, className } = props
const icon = iconMapping[type] const icon = iconMapping[type]
return ( return (
@ -26,5 +26,3 @@ const Proxy: React.SFC<ProxyProps> = props => {
</div> </div>
) )
} }
export default Proxy

View File

@ -4,23 +4,23 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
height: 80px; justify-content: center;
width: 80px; height: 100px;
width: 100px;
box-shadow: 0 0 20px rgba($color-primary-dark, 0.2); box-shadow: 0 0 20px rgba($color-primary-dark, 0.2);
border-radius: 4px; border-radius: 4px;
} }
.proxy-icon { .proxy-icon {
margin-top: 12px;
height: 40px; height: 40px;
width: 40px; width: 40px;
} }
.proxy-name { .proxy-name {
width: 80%; width: 80%;
margin-top: 6px; margin-top: 8px;
color: $color-primary-dark; color: $color-primary-dark;
font-size: 10px; font-size: 12px;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
text-align: center; text-align: center;

View File

@ -0,0 +1 @@
export * from './Proxy'

View File

@ -2,7 +2,7 @@ import * as React from 'react'
import { Header, Icon } from '@components' import { Header, Icon } from '@components'
import { ProxyType } from '@models' import { ProxyType } from '@models'
import Proxy from './Proxy' import { Proxy } from './components'
import './style.scss' import './style.scss'
export class Proxies extends React.Component<{}, {}> { export class Proxies extends React.Component<{}, {}> {

View File

@ -1,6 +1,7 @@
@import '~@styles/variables'; @import '~@styles/variables';
.proxies-list { .proxies-list {
margin: 10px 0;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
list-style: none; list-style: none;