Created
May 18, 2017 20:50
-
-
Save mrcthms/ffa92dfab9e5107f7037d4d17880727c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import deepAssign from 'deep-assign'; | |
import Badge from './components/Badge'; | |
import data from './data'; | |
import Table from './ui/Table'; | |
import './App.css'; | |
import propTypesToObject from './helpers/propTypesToObject'; | |
import propTypesToDescriptions from './helpers/propTypesToDescriptions'; | |
const propTypes = propTypesToObject({ | |
propTypes: Badge.propTypes | |
}); | |
const propTypeDescriptions = propTypesToDescriptions({ | |
propTypes: Badge.propTypes, | |
data: data.propTypes.Badge | |
}); | |
const App = props => ( | |
<div className="app"> | |
<Badge | |
withHeading | |
heading="Hello Darkness"> | |
My Old Friend | |
</Badge> | |
<Table | |
propTypes={deepAssign({}, propTypes, propTypeDescriptions)} | |
/> | |
</div> | |
); | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment