mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 12:23: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
83
types/Editor/Editor.svelte.d.ts
vendored
Normal file
83
types/Editor/Editor.svelte.d.ts
vendored
Normal file
|
@ -0,0 +1,83 @@
|
|||
/// <reference types="svelte" />
|
||||
import type { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface EditorProps {
|
||||
/**
|
||||
* Set to `true` to disable the dropdown
|
||||
* @default false
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the title text
|
||||
* @default ""
|
||||
*/
|
||||
titleText?: string;
|
||||
|
||||
/**
|
||||
* Set to `true` to indicate an invalid state
|
||||
* @default false
|
||||
*/
|
||||
invalid?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the invalid state text
|
||||
* @default ""
|
||||
*/
|
||||
invalidText?: string;
|
||||
|
||||
/**
|
||||
* Set to `true` to indicate an warning state
|
||||
* @default false
|
||||
*/
|
||||
warn?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the warning state text
|
||||
* @default ""
|
||||
*/
|
||||
warnText?: string;
|
||||
|
||||
/**
|
||||
* Specify the helper text
|
||||
* @default ""
|
||||
*/
|
||||
helperText?: string;
|
||||
|
||||
/**
|
||||
* Set to `true` to visually hide the label text
|
||||
* @default false
|
||||
*/
|
||||
hideLabel?: boolean;
|
||||
|
||||
/**
|
||||
* Set an id for the list box component
|
||||
* @default "ccs-" + Math.random().toString(36)
|
||||
*/
|
||||
id?: string;
|
||||
|
||||
/**
|
||||
* Specify the placeholder text
|
||||
* @default null
|
||||
*/
|
||||
placeholder?: undefined;
|
||||
|
||||
/**
|
||||
* Specify the html
|
||||
* @default undefined
|
||||
*/
|
||||
html?: string;
|
||||
|
||||
/**
|
||||
* Specify the text
|
||||
* @default undefined
|
||||
*/
|
||||
text?: string;
|
||||
|
||||
/**
|
||||
* @default { modules: { toolbar }, theme: 'snow', placeholder }
|
||||
*/
|
||||
options?: { modules: { toolbar }; theme: "snow"; placeholder };
|
||||
}
|
||||
|
||||
export default class Editor extends SvelteComponentTyped<EditorProps, {}, {}> {}
|
22
types/Editor/EditorSkeleton.svelte.d.ts
vendored
Normal file
22
types/Editor/EditorSkeleton.svelte.d.ts
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
/// <reference types="svelte" />
|
||||
import type { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface EditorSkeletonProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
||||
/**
|
||||
* Set to `true` to hide the label text
|
||||
* @default false
|
||||
*/
|
||||
hideLabel?: boolean;
|
||||
}
|
||||
|
||||
export default class EditorSkeleton extends SvelteComponentTyped<
|
||||
EditorSkeletonProps,
|
||||
{
|
||||
click: WindowEventMap["click"];
|
||||
mouseover: WindowEventMap["mouseover"];
|
||||
mouseenter: WindowEventMap["mouseenter"];
|
||||
mouseleave: WindowEventMap["mouseleave"];
|
||||
},
|
||||
{}
|
||||
> {}
|
Loading…
Add table
Add a link
Reference in a new issue