import React, { PureComponent } from ‘react‘
import Home from ‘../home‘
import Profile from ‘../profile‘
import styled,{ThemeProvider} from ‘styled-components‘
const HYButton = styled.button`
padding: 10px 20px ;
color: #fff;
`
const HYp = styled.p`
color: ${props => props.theme.themeColor};
font-size: ${props => props.theme.fontSize};
`
// 样式继承
const HYPrimaryButton = styled(HYButton)`
background-color: #5082ff;
`
export default class App extends PureComponent {
render() {
return (
<ThemeProvider theme={{themeColor:"skyblue",fontSize:"30px"}}>
<Home />
<hr />
<Profile />
<HYp className="themeTitle">主题设置</HYp>
<HYButton> 普通按钮 </HYButton>
<HYPrimaryButton> 主要按钮 </HYPrimaryButton>
</ThemeProvider>
)
}
}