Skip to content

Instantly share code, notes, and snippets.

@mrcthms
Created May 18, 2017 20:50
Show Gist options
  • Save mrcthms/ffa92dfab9e5107f7037d4d17880727c to your computer and use it in GitHub Desktop.
Save mrcthms/ffa92dfab9e5107f7037d4d17880727c to your computer and use it in GitHub Desktop.
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