diff options
author | bobzel <zzzman@gmail.com> | 2022-04-04 11:39:17 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-04-04 11:39:17 -0400 |
commit | 1ca9e485ea99db7db35fe52b0e15d6defa7568d3 (patch) | |
tree | 76afa097726e2eb8761ec3e7d811c9d72e4c6d89 /src/fields/Types.ts | |
parent | 69625f2e9ecbffaa343af16eebe04c9b555fdf23 (diff) |
cleaned up warnings. fixed ink to work better with it's label boxes by not letting textbox ComponentView override inkinstroke. made ink text boxes go away unless they have text or are selected. fixed up brushing code and made it work for ink and ink w/ text labels
Diffstat (limited to 'src/fields/Types.ts')
-rw-r--r-- | src/fields/Types.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fields/Types.ts b/src/fields/Types.ts index c90f3b6b3..7e2aa5681 100644 --- a/src/fields/Types.ts +++ b/src/fields/Types.ts @@ -4,6 +4,8 @@ import { RefField } from "./RefField"; import { DateField } from "./DateField"; import { ScriptField } from "./ScriptField"; import { URLField, WebField, ImageField } from "./URLField"; +import { TextField } from "@material-ui/core"; +import { RichTextField } from "./RichTextField"; export type ToType<T extends InterfaceValue> = T extends "string" ? string : @@ -88,6 +90,9 @@ export function BoolCast(field: FieldResult, defaultVal: boolean | null = false) export function DateCast(field: FieldResult) { return Cast(field, DateField, null); } +export function RTFCast(field: FieldResult) { + return Cast(field, RichTextField, null); +} export function ScriptCast(field: FieldResult, defaultVal: ScriptField | null = null) { return Cast(field, ScriptField, defaultVal); |