Skip to content

Commit

Permalink
docs: make large code blocks more legible
Browse files Browse the repository at this point in the history
Components with large blocks of Default code
cause the table to extend beyond the page, making
it difficult to read. Make the code wrap properly
and allow the container to scroll.

As a specific example, this can be seen in the props
for Search.Result.
  • Loading branch information
redbmk committed Oct 20, 2017
1 parent e95ee2c commit ea316ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class ComponentProps extends Component {
/>

{activeName && (
<div>
<div style={{ overflowX: 'auto' }}>
<ComponentPropsDescription description={description} />
<ComponentTable name={activeName} props={props} />
</div>
Expand Down
6 changes: 2 additions & 4 deletions docs/app/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,11 @@
}
code:not(.hljs) {
padding: 0;
padding-top: 0.1em;
padding-bottom: 0.2em;
margin: 0;
font-size: 87.5%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
white-space: pre;
display: inline-block;
}
code:not(.hljs)::before {
Expand Down

0 comments on commit ea316ae

Please sign in to comment.