improve visibility of some code-blocks

This commit is contained in:
Marcos Moura 2016-11-28 15:06:53 -02:00
parent 20675ec905
commit c7b22b9e15
2 changed files with 6 additions and 3 deletions

View file

@ -1,6 +1,6 @@
<template>
<div class="code-block" :data-lang="lang">
<div class="code-block-wrapper">
<div class="code-block-wrapper" :style="{ 'max-height': height }">
<pre><code :class="lang" ref="block"><slot></slot></code></pre>
<span class="copied" :class="{ 'active': showMessage }">Copied!</span>
@ -168,7 +168,10 @@
highlight.registerLanguage('javascript', highlightJS);
export default {
props: ['lang'],
props: {
lang: String,
height: [Number, String]
},
data: () => ({
showMessage: false
}),

View file

@ -47,7 +47,7 @@
</api-table>
<api-table name="md-account-header">
<code-block lang="xml">
<code-block lang="xml" height="none">
&lt;md-toolbar class=&quot;md-account-header&quot;&gt;
&lt;md-list class=&quot;md-transparent&quot;&gt;
&lt;md-list-item class=&quot;md-avatar-list&quot;&gt;