mirror of
https://github.com/perfect-panel/ppanel-web.git
synced 2026-02-16 13:21:10 -05:00
🐛 fix: Add showLineNumbers prop handling in MonacoEditor for improved placeholder positioning
This commit is contained in:
parent
a3c5e31094
commit
bd67ece479
@ -96,6 +96,7 @@ export function TemplatePreview({ applicationId, output_format }: TemplatePrevie
|
|||||||
title={t('title')}
|
title={t('title')}
|
||||||
value={getDisplayContent()}
|
value={getDisplayContent()}
|
||||||
language={mapLanguage(output_format)}
|
language={mapLanguage(output_format)}
|
||||||
|
showLineNumbers
|
||||||
readOnly
|
readOnly
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -168,7 +168,12 @@ export function MonacoEditor({
|
|||||||
/>
|
/>
|
||||||
{!internalValue?.trim() && placeholder && (
|
{!internalValue?.trim() && placeholder && (
|
||||||
<pre
|
<pre
|
||||||
className='text-muted-foreground pointer-events-none absolute left-7 top-4 text-sm'
|
className={cn(
|
||||||
|
'text-muted-foreground pointer-events-none absolute left-7 top-4 text-sm',
|
||||||
|
{
|
||||||
|
'left-16': showLineNumbers,
|
||||||
|
},
|
||||||
|
)}
|
||||||
style={{ userSelect: 'none' }}
|
style={{ userSelect: 'none' }}
|
||||||
>
|
>
|
||||||
{placeholder}
|
{placeholder}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user