Commit 011edba5 authored by Miranda Fluharty's avatar Miranda Fluharty Committed by Savas Vedova

Use selected syntax highlighting theme in code block component

parent f39beb16
......@@ -24,8 +24,13 @@ export default {
return isScrollable ? scrollableStyles : null;
},
},
userColorScheme: window.gon.user_color_scheme,
};
</script>
<template>
<pre class="code-block rounded" :style="styleObject"><code class="d-block">{{ code }}</code></pre>
<pre
class="code-block rounded code"
:class="$options.userColorScheme"
:style="styleObject"
><code class="d-block">{{ code }}</code></pre>
</template>
......@@ -337,8 +337,6 @@
}
.code-block {
background: $black;
color: $gray-darkest;
white-space: pre;
overflow-x: auto;
font-size: 12px;
......
......@@ -2,7 +2,7 @@
exports[`Code Block with default props renders correctly 1`] = `
<pre
class="code-block rounded"
class="code-block rounded code"
>
<code
class="d-block"
......@@ -14,7 +14,7 @@ exports[`Code Block with default props renders correctly 1`] = `
exports[`Code Block with maxHeight set to "200px" renders correctly 1`] = `
<pre
class="code-block rounded"
class="code-block rounded code"
style="max-height: 200px; overflow-y: auto;"
>
<code
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment