添加common.scss

This commit is contained in:
waliang.wang 2017-07-06 17:01:48 +08:00
parent 9a9809bca9
commit dbcf9ed02c
6 changed files with 70 additions and 19 deletions

View File

@ -1,7 +1,5 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import Routes from './routes' import Routes from './routes'
import './styles/lx.scss'
// import './styles/index.css'
class App extends Component { class App extends Component {
render() { render() {

View File

@ -1,12 +1,39 @@
import React from 'react' import '../../styles/Home/home.scss'
import { Button } from 'antd'; import React, { Component } from 'react'
import { Button, Input, Icon, Checkbox } from 'antd'
import Header from '../../components/Header/Header.js' import Header from '../../components/Header/Header.js'
export default function Home() { class Home extends Component {
constructor(props) {
super(props)
}
render () {
return ( return (
<acticle> <acticle>
<Header /> <Header />
<Button type="primary">Primary</Button>
<h3>YAPI</h3>
<div className="home-box">
<Input
size="large"
placeholder="Username"
prefix={<Icon type="user" style={{ fontSize: 14 }} />} />
<Input
size="large"
type="password"
placeholder="Password"
prefix={<Icon type="lock" style={{ fontSize: 14 }} />} />
<Button type="primary">登录</Button>
</div>
<Checkbox>记住密码</Checkbox>
</acticle> </acticle>
) )
} }
}
export default Home

View File

@ -0,0 +1,6 @@
@import '../common.scss';
body {
border: 1px #f00 solid;
font-size: 1.8rem;
}

27
client/styles/common.scss Normal file
View File

@ -0,0 +1,27 @@
@import '~antd/dist/antd.css';
html, body {
font-family: 'Microsoft Yahei';
margin: 0;
padding: 0;
height: 100;
font-size: 62.5%;
}
div, article, p, table, tr, td, th, ul, ol, li, h1, h2, h3, form, dl, dt, dd {
margin: 0;
padding: 0;
box-sizing: border-box;
}
ul {
list-style-type: none;
}
a {
text-decoration: none;
}
a:hover {
color: #636363;
}

View File

@ -1,7 +0,0 @@
@import '~antd/dist/antd.css';
html {
body {
border: 1px #f00 solid;
background: #F99;
}
}