mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 20:33:02 +00:00
Editor component initial commit
This commit is contained in:
parent
f80dbd8978
commit
4d9fc5e597
7 changed files with 315 additions and 0 deletions
42
docs/src/pages/components/Editor.svx
Normal file
42
docs/src/pages/components/Editor.svx
Normal file
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
components: ["Editor", "EditorSkeleton"]
|
||||
---
|
||||
|
||||
<script>
|
||||
import { Editor, EditorSkeleton, InlineNotification } from "carbon-components-svelte";
|
||||
import Preview from "../../components/Preview.svelte";
|
||||
</script>
|
||||
|
||||
`Editor` is keyed for performance reasons.
|
||||
|
||||
<InlineNotification svx-ignore lowContrast title="Note:" kind="info" hideCloseButton>
|
||||
<div class="body-short-01"><code>html</code> attribute contains pure html.</div>
|
||||
</InlineNotification>
|
||||
|
||||
### Default
|
||||
|
||||
<Editor titleText="Document" html="<p>Hello</p>" />
|
||||
|
||||
### Extra-large size
|
||||
|
||||
<Editor titleText="Document" html="<p>Hello</p>" />
|
||||
|
||||
### Small size
|
||||
|
||||
<Editor titleText="Document" html="<p>Hello</p>" />
|
||||
|
||||
### Invalid state
|
||||
|
||||
<Editor invalid invalidText="Secondary contact method must be different from the primary contact" titleText="Document" html="<p>Hello</p>" />
|
||||
|
||||
### Warning state
|
||||
|
||||
<Editor warn warnText="This contact method is not associated with your account" titleText="Document" html="<p>Hello</p>" />
|
||||
|
||||
### Disabled state
|
||||
|
||||
<Editor disabled titleText="Document" html="<p>Hello</p>" />
|
||||
|
||||
### Skeleton
|
||||
|
||||
<EditorSkeleton />
|
Loading…
Add table
Add a link
Reference in a new issue