Skip to content

Commit 3688850

Browse files
committed
feat(docs): add line option to Code component
1 parent d653714 commit 3688850

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/views/components/Code.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<template>
22
<div
3-
class="line-numbers"
4-
:class="tw`px-1 py-2 bg-gray-100 dark:bg-gray-800 overflow-auto`"
3+
:class="[
4+
tw`bg-gray-100 dark:bg-gray-800 overflow-auto`,
5+
!inline ? tw`line-numbers px-1 py-2` : tw`px-8 py-6`
6+
]"
57
>
68
<Prism :language="lang === 'vue' ? 'html' : lang" :inline="inline">{{
79
formattedCode

0 commit comments

Comments
 (0)