Skip to content

Commit

Permalink
Fixed Code component
Browse files Browse the repository at this point in the history
  • Loading branch information
KittyGiraudel committed May 7, 2017
1 parent 50bb475 commit 13d882d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/Code/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ class Code extends React.Component {
const language = this.props.language ? `language-${this.props.language}` : ''

return (
<pre className={'Pre ' + language} ref={(ref) => (this.code = ref)}>
<code className='Code'>{this.props.children}</code>
<pre className={'Pre ' + language}>
<code className='Code' ref={(ref) => (this.code = ref)}>
{this.props.children}
</code>
</pre>
)
}
Expand Down
5 changes: 5 additions & 0 deletions src/components/Code/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
hyphens: none;
}

.Code {
max-width: 700px;
max-width: 70ch;
}

.token.comment,
.token.prolog,
.token.doctype,
Expand Down

0 comments on commit 13d882d

Please sign in to comment.