Doc section updates

pull/4569/head
Tuğçe Küçükoğlu 2023-10-06 17:00:02 +03:00
parent 1d24d51fdb
commit 6f7c8c7382
2 changed files with 8 additions and 5 deletions

View File

@ -402,8 +402,7 @@ pre[class*="language-"] {
margin: 0;
color: var(--surface-900);
font-size: 14px;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
border-radius: 10px;
}
}

View File

@ -1,6 +1,10 @@
<template>
<div v-if="!embedded" class="surface-card mb-4" :class="scrollable ? '' : 'relative'" style="border-radius: 10px">
<div class="flex doc-section-code-buttons surface-card align-items-center justify-content-end z-1" :style="scrollable ? { position: 'sticky', padding: '0.75rem 0.75rem 0 0' } : { position: 'absolute', top: '0.75rem', right: '0.75rem' }">
<div v-if="!embedded" :class="scrollable ? 'doc-section-code' : 'relative doc-section-code'">
<div
class="flex doc-section-code-buttons surface-card align-items-center justify-content-end z-1"
:style="scrollable ? { position: 'sticky', padding: '0.75rem 0.75rem 0 0' } : { position: 'absolute', top: '0.75rem', right: '0.75rem' }"
style="gap: 0.75rem"
>
<template v-if="codeMode !== 'basic' && !hideToggleCode">
<Button
:class="['p-button-rounded p-button-text p-button-plain p-0 inline-flex align-items-center justify-content-center', { 'doc-section-code-buttons-active text-primary': codeLang === 'composition' }]"
@ -76,7 +80,7 @@
></Button>
</div>
<div class="relative doc-section-code overflow-auto" :style="scrollable ? { 'max-height': '40rem' } : undefined" style="border-radius: 10px">
<div :style="scrollable ? { 'max-height': '40rem' } : undefined">
<template v-if="codeMode === 'basic' && importCode">
<pre v-code.script><code>{{ code.basic }}
</code></pre>