Skip to content

Commit

Permalink
Merge pull request #32 from kadirahq/handle-css-resets
Browse files Browse the repository at this point in the history
Handle css resets
  • Loading branch information
Muhammed Thanish authored Jun 29, 2016
2 parents 61c9e97 + 9c70316 commit 92a981c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
10 changes: 9 additions & 1 deletion src/components/PropTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ for (let typeName in React.PropTypes) {
PropTypesMap.set(type, typeName);
}

const stylesheet = {
propTable: {
marginLeft: -10,
borderSpacing: '10px 5px',
borderCollapse: 'separate',
}
};

export default class PropTable extends React.Component {
render () {
const type = this.props.type;
Expand Down Expand Up @@ -57,7 +65,7 @@ export default class PropTable extends React.Component {
});

return (
<table>
<table style={stylesheet.propTable}>
<thead>
<tr>
<th>property</th>
Expand Down
7 changes: 5 additions & 2 deletions src/components/Story.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ const stylesheet = {
fontSize: 25,
borderBottom: '1px solid #EEE',
}
}
},
propTableHead: {
margin: '20px 0 0 0'
},
}

export default class Story extends React.Component {
Expand Down Expand Up @@ -263,7 +266,7 @@ export default class Story extends React.Component {
const propTables = array.map(function (type, idx) {
return (
<div key={idx}>
<h2>"{type.displayName || type.name}" Component</h2>
<h2 style={stylesheet.propTableHead}>"{type.displayName || type.name}" Component</h2>
<PropTable type={type} />
</div>
);
Expand Down

0 comments on commit 92a981c

Please sign in to comment.