Skip to content

Commit

Permalink
Merge branch 'master' into redux
Browse files Browse the repository at this point in the history
  • Loading branch information
diegohaz committed Jan 19, 2017
2 parents 63a914f + d5c4f38 commit cf0b2a1
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 24 deletions.
1 change: 1 addition & 0 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ var baseConfig = require('../webpack.config')
module.exports = function (storybookBaseConfig, configType) {
storybookBaseConfig.resolve = baseConfig.resolve
storybookBaseConfig.entry.preview.unshift('babel-polyfill')
storybookBaseConfig.module.loaders.push(...baseConfig.module.loaders)
return storybookBaseConfig
}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<p align="center">
<img width="206" alt="arclogo2" src="https://cloud.githubusercontent.com/assets/3068563/19498653/f9b73170-9570-11e6-9183-61dce798abab.png"><br><br>
<a href="http://standardjs.com"><img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square" alt="Standard Style" /></a>

<a href="https://travis-ci.org/diegohaz/arc"><img src="https://img.shields.io/travis/diegohaz/arc/redux.svg?style=flat-square" alt="Build Status" /></a>
<a href="https://codecov.io/gh/diegohaz/arc/branch/redux"><img src="https://img.shields.io/codecov/c/github/diegohaz/arc/redux.svg?style=flat-square" alt="Coverage Status" /></a>
<a href="https://gitter.im/atomic-react/Lobby"><img src="https://img.shields.io/badge/gitter-join%20chat-1dce73.svg?style=flat-square" alt="Gitter chat" /></a>
</p>

## Redux
Expand Down
25 changes: 13 additions & 12 deletions src-clean/components/App.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import React, { PropTypes, Component } from 'react'
import { injectGlobal } from 'styled-components'
import React, { PropTypes } from 'react'
import { injectGlobal, ThemeProvider } from 'styled-components'

import theme from './themes/default'

injectGlobal`
body {
margin: 0;
}
`

class App extends Component {
static propTypes = {
children: PropTypes.any
}
const App = ({ children }) => {
return (
<ThemeProvider theme={theme}>
{children}
</ThemeProvider>
)
}

render () {
const { children } = this.props
return (
<div>{children}</div>
)
}
App.propTypes = {
children: PropTypes.any
}

export default App
8 changes: 8 additions & 0 deletions src-clean/components/pages/HomePage/index.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from 'react'
import { storiesOf } from '@kadira/storybook'
import { HomePage } from 'components'

storiesOf('HomePage', module)
.add('default', () => (
<HomePage />
))
21 changes: 10 additions & 11 deletions src/components/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { PropTypes, Component } from 'react'
import React, { PropTypes } from 'react'
import { injectGlobal, ThemeProvider } from 'styled-components'

import theme from './themes/default'
Expand All @@ -9,17 +9,16 @@ injectGlobal`
}
`

class App extends Component {
static propTypes = {
children: PropTypes.any
}
const App = ({ children }) => {
return (
<ThemeProvider theme={theme}>
{children}
</ThemeProvider>
)
}

render () {
const { children } = this.props
return (
<ThemeProvider theme={theme}>{children}</ThemeProvider>
)
}
App.propTypes = {
children: PropTypes.any
}

export default App

0 comments on commit cf0b2a1

Please sign in to comment.