Add error border when rich text field fails validation
This commit is contained in:
parent
51801bf2d0
commit
46ad1dc2c4
|
@ -10,11 +10,30 @@
|
||||||
export let fullScreenOffset = 0
|
export let fullScreenOffset = 0
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<MarkdownEditor
|
<div class:error>
|
||||||
|
<MarkdownEditor
|
||||||
{value}
|
{value}
|
||||||
{placeholder}
|
{placeholder}
|
||||||
{height}
|
{height}
|
||||||
{id}
|
{id}
|
||||||
{fullScreenOffset}
|
{fullScreenOffset}
|
||||||
on:change
|
on:change
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.error :global(.EasyMDEContainer .editor-toolbar) {
|
||||||
|
border-top-color: var(--spectrum-semantic-negative-color-default);
|
||||||
|
border-left-color: var(--spectrum-semantic-negative-color-default);
|
||||||
|
border-right-color: var(--spectrum-semantic-negative-color-default);
|
||||||
|
}
|
||||||
|
.error :global(.EasyMDEContainer .CodeMirror) {
|
||||||
|
border-bottom-color: var(--spectrum-semantic-negative-color-default);
|
||||||
|
border-left-color: var(--spectrum-semantic-negative-color-default);
|
||||||
|
border-right-color: var(--spectrum-semantic-negative-color-default);
|
||||||
|
}
|
||||||
|
.error :global(.EasyMDEContainer .editor-preview-side) {
|
||||||
|
border-bottom-color: var(--spectrum-semantic-negative-color-default);
|
||||||
|
border-right-color: var(--spectrum-semantic-negative-color-default);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue