mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-04-02 05:23:21 +00:00
add textarea type
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
ValueSpecList,
|
||||
ValueSpecNumber,
|
||||
ValueSpecString,
|
||||
ValueSpecTextarea,
|
||||
} from "../config-types";
|
||||
import { guardAll } from "../../util";
|
||||
|
||||
@@ -66,7 +67,6 @@ export class Value<A extends ValueSpec> extends IBuilder<A> {
|
||||
placeholder: string | null;
|
||||
pattern: string | null;
|
||||
patternDescription: string | null;
|
||||
textarea: boolean | null;
|
||||
}
|
||||
>(a: A) {
|
||||
return new Value({
|
||||
@@ -74,6 +74,20 @@ export class Value<A extends ValueSpec> extends IBuilder<A> {
|
||||
...a,
|
||||
} as ValueSpecString);
|
||||
}
|
||||
static textarea<
|
||||
A extends {
|
||||
name: string;
|
||||
description: string | null;
|
||||
warning: string | null;
|
||||
nullable: boolean;
|
||||
placeholder: string | null;
|
||||
}
|
||||
>(a: A) {
|
||||
return new Value({
|
||||
type: "textarea" as const,
|
||||
...a,
|
||||
} as ValueSpecTextarea);
|
||||
}
|
||||
static number<
|
||||
A extends {
|
||||
name: string;
|
||||
|
||||
Reference in New Issue
Block a user