feat(dropdown): support warning state

This commit is contained in:
Eric Liu 2021-01-23 05:47:26 -08:00
commit 038dd3ad82
8 changed files with 112 additions and 6 deletions

View file

@ -81,6 +81,18 @@ export interface DropdownProps extends svelte.JSX.HTMLAttributes<HTMLElementTagN
*/
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 ""

View file

@ -8,5 +8,6 @@ export default class FluidForm {
default: {};
};
$on(eventname: "submit", cb: (event: WindowEventMap["submit"]) => void): () => void;
$on(eventname: string, cb: (event: Event) => void): () => void;
}

View file

@ -41,6 +41,18 @@ export interface ListBoxProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNa
* @default ""
*/
invalidText?: string;
/**
* Set to `true` to indicate an warning state
* @default false
*/
warn?: boolean;
/**
* Specify the warning state text
* @default ""
*/
warnText?: string;
}
export default class ListBox {