fix: proper padding applied to the monaco editors
This commit is contained in:
@@ -45,6 +45,11 @@ public partial class CaddyfileEditor : ComponentBase
|
|||||||
Language = "graphql",
|
Language = "graphql",
|
||||||
Value = _caddyConfigurationContent,
|
Value = _caddyConfigurationContent,
|
||||||
Theme = "vs-dark",
|
Theme = "vs-dark",
|
||||||
|
Padding = new EditorPaddingOptions
|
||||||
|
{
|
||||||
|
Top = 8f,
|
||||||
|
Bottom = 8f,
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
<MudText Typo="Typo.caption" Style="padding-left: 18px; padding-bottom: 8px;">File content</MudText>
|
<MudText Typo="Typo.caption" Style="padding-left: 18px; padding-bottom: 8px;">File content</MudText>
|
||||||
<StandaloneCodeEditor @ref="_codeEditor" ConstructionOptions="@EditorConstructionOptions"
|
<StandaloneCodeEditor @ref="_codeEditor" ConstructionOptions="@EditorConstructionOptions"
|
||||||
CssClass="caddy-file-editor global-caddy"></StandaloneCodeEditor>
|
CssClass="caddy-file-editor global-caddy"></StandaloneCodeEditor>
|
||||||
<MudDivider/>
|
|
||||||
</MudCardContent>
|
</MudCardContent>
|
||||||
<MudCardActions>
|
<MudCardActions>
|
||||||
<MudContainer Class="d-flex flex-row-reverse flex-grow-1 gap-4">
|
<MudContainer Class="d-flex flex-row-reverse flex-grow-1 gap-4">
|
||||||
|
|||||||
@@ -26,9 +26,14 @@ public partial class CaddyfilePage : ComponentBase
|
|||||||
return new StandaloneEditorConstructionOptions
|
return new StandaloneEditorConstructionOptions
|
||||||
{
|
{
|
||||||
AutomaticLayout = true,
|
AutomaticLayout = true,
|
||||||
Language = "plaintext",
|
Language = "graphql",
|
||||||
Value = _caddyConfigurationContent,
|
Value = _caddyConfigurationContent,
|
||||||
Theme = "vs-dark",
|
Theme = "vs-dark",
|
||||||
|
Padding = new EditorPaddingOptions
|
||||||
|
{
|
||||||
|
Top = 8f,
|
||||||
|
Bottom = 8f,
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,5 +11,4 @@
|
|||||||
.caddy-file-editor .monaco-editor {
|
.caddy-file-editor .monaco-editor {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: inherit;
|
border-radius: inherit;
|
||||||
padding: 8px;
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user