Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

Commit 3416d43

Browse files
Add cssPath to docs
1 parent 54352a3 commit 3416d43

File tree

1 file changed

+49
-28
lines changed

1 file changed

+49
-28
lines changed

src/components/Sections/PropsSection.vue

Lines changed: 49 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,26 @@
1616
</tr>
1717
</thead>
1818
<tbody>
19-
<tr v-for="(prop, key) in componentProps" :key="prop">
20-
<td :id="prop?.id" valign="top">{{ key }}</td>
21-
<td class="prop-type" valign="top">{{ prop.type }}</td>
22-
<td class="prop-default" valign="top">{{ prop.default }}</td>
23-
<td valign="top" v-html="prop.description"></td>
19+
<tr
20+
v-for="(prop, key) in componentProps"
21+
:key="prop"
22+
>
23+
<td
24+
:id="prop?.id"
25+
valign="top"
26+
>{{ key }}</td>
27+
<td
28+
class="prop-type"
29+
valign="top"
30+
>{{ prop.type }}</td>
31+
<td
32+
class="prop-default"
33+
valign="top"
34+
>{{ prop.default }}</td>
35+
<td
36+
valign="top"
37+
v-html="prop.description"
38+
></td>
2439
</tr>
2540
</tbody>
2641
</table>
@@ -39,73 +54,79 @@ const highlightJsLinks = inject('highlightJsLinks');
3954
4055
const componentProps = {
4156
browserWindow: {
42-
type: 'Boolean',
57+
type: 'boolean',
4358
required: false,
4459
default: false,
4560
description: 'To give the code block a browser window look.',
4661
},
62+
cssPath: {
63+
type: 'string | undefined',
64+
required: false,
65+
default: 'undefined',
66+
description: 'Used to load the css from a specified location instead of the component using the CDN location. If you want to dynamically change the theme, you will also need to change the theme prop.',
67+
},
4768
code: {
48-
type: '[Object, Array, String, Number]',
69+
type: 'object | string | number',
4970
required: true,
5071
default: '',
5172
description: 'The code to be displayed in the code block.',
5273
},
5374
codeBlockRadius: {
54-
type: 'String',
75+
type: 'string',
5576
required: false,
5677
default: '0.5rem',
5778
description: 'The border radius of the code block.',
5879
},
5980
copyButton: {
60-
type: Boolean,
81+
type: 'boolean',
6182
required: false,
6283
default: true,
6384
description: 'To show a copy button within the code block',
6485
},
6586
copyIcons: {
66-
type: 'Boolean',
87+
type: 'boolean',
6788
required: false,
6889
default: true,
6990
description: 'To show the copy icons on the copy code tab.',
7091
},
7192
copyTab: {
72-
type: 'Boolean',
93+
type: 'boolean',
7394
required: false,
7495
default: true,
7596
description: 'To show the copy code tab.',
7697
},
7798
copyFailedText: {
78-
type: 'String',
99+
type: 'string',
79100
required: false,
80101
default: 'Copy failed!',
81102
description: 'The text to be displayed when the code copy failed.',
82103
},
83104
copyText: {
84-
type: 'String',
105+
type: 'string',
85106
required: false,
86107
default: 'Copy Code',
87108
description: 'The text to be displayed on the copy tab.',
88109
},
89110
copySuccessText: {
90-
type: 'String',
111+
type: 'string',
91112
required: false,
92113
default: 'Copied!',
93114
description: 'The text to be displayed when the code copy was successful.',
94115
},
95116
floatingTabs: {
96-
type: 'Boolean',
117+
type: 'boolean',
97118
required: false,
98119
default: true,
99120
description: 'To make the tabs float on top of the code block.',
100121
},
101122
height: {
102-
type: '[String, Number]',
123+
type: 'string | number',
103124
required: false,
104125
default: 'auto',
105126
description: 'The height of the code block.',
106127
},
107128
highlightjs: {
108-
type: 'Boolean',
129+
type: 'boolean',
109130
required: false,
110131
default: 'false',
111132
description: 'Specifies that the Highlight.js library should be used.',
@@ -117,67 +138,67 @@ const componentProps = {
117138
description: 'The number of spaces to indent the code for json.',
118139
},
119140
label: {
120-
type: 'String',
141+
type: 'string',
121142
required: false,
122143
default: '',
123144
description: 'The label to be displayed on the code block.',
124145
},
125146
lang: {
126-
type: 'String',
147+
type: 'string',
127148
required: false,
128149
default: 'javascript',
129150
description: 'The language of the code.',
130151
},
131152
maxHeight: {
132-
type: '[String, Number]',
153+
type: 'string | number',
133154
required: false,
134155
default: 'auto',
135156
description: 'The max height of the code block.',
136157
},
137158
persistentCopyButton: {
138-
type: 'Boolean',
159+
type: 'boolean',
139160
required: false,
140161
default: false,
141162
description: 'To show a persistent copy button within the code block',
142163
},
143164
prismjs: {
144-
type: 'Boolean',
165+
type: 'boolean',
145166
required: false,
146167
default: 'true',
147168
description: 'Specifies that the PrismJS library should be used.',
148169
},
149170
prismPlugin: {
150-
type: 'Boolean',
171+
type: 'boolean',
151172
required: false,
152173
default: 'false',
153174
description: 'Specifies that a PrismJS plugin is being used. This is needed for the plugin to work properly.',
154175
},
155176
runTab: {
156-
type: 'Boolean',
177+
type: 'boolean',
157178
required: false,
158179
default: false,
159180
description: 'To show the run tab.',
160181
},
161182
runText: {
162-
type: 'String',
183+
type: 'string',
163184
required: false,
164185
default: 'Run',
165186
description: 'The text to be displayed on the run tab.',
166187
},
167188
tabGap: {
168-
type: 'String',
189+
type: 'string',
169190
required: false,
170191
default: '0.25rem',
171192
description: 'The gap between the tabs.',
172193
},
173194
tabs: {
174-
type: 'Boolean',
195+
type: 'boolean',
175196
required: false,
176197
default: false,
177198
description: 'To show the tabs. This will show/hide all tabs.',
178199
},
179200
theme: {
180-
type: '[String, Boolean]',
201+
type: 'string | boolean',
181202
required: false,
182203
id: 'props-theme-option',
183204
default: 'neon-bunny',

0 commit comments

Comments
 (0)