When you include more than one code blocks inside a
<CH.Code>, Code Hike will show them as tabs.
You can also show two files at the same time in two panels. Use a divider
--- to separate the top tabs from the bottom tabs.
You can override some of the configuration options by passing props to
Then there are the
className props. You can use them to customize the styles of the component.
<CH.Code> will take the height needed to fit all the lines of the given code. As we saw in the previous example, you can use CSS to set a fixed height.
Instead of setting the height with CSS, you can also use the
rows prop. You pass the number of lines you want to show, and Code Hike will set the height accordingly.
In addition to the number of lines, you can also pass
"focus", then the height of the code will match the height of the focused lines.