From 270ee7f9d01ed8d3432f162f40cfe28db9503cfc Mon Sep 17 00:00:00 2001 From: alinayejin Date: Mon, 18 Dec 2023 17:35:58 -0500 Subject: add state message gif --- .../collectionFreeForm/CollectionFreeFormInfoState.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormInfoState.tsx') diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormInfoState.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormInfoState.tsx index 66aa29de0..deab92258 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormInfoState.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormInfoState.tsx @@ -3,6 +3,7 @@ import { observer } from 'mobx-react'; import * as React from 'react'; import { ObservableReactComponent } from '../../ObservableReactComponent'; import './CollectionFreeFormView.scss'; +import assets from './assets/link.png'; /** * An Fsa Arc. The first array element is a test condition function that will be observed. @@ -13,11 +14,13 @@ export type infoArc = [() => any, (res?: any) => infoState]; export const StateMessage = Symbol('StateMessage'); export const StateEntryFunc = Symbol('StateEntryFunc'); +export const StateMessageGIF = Symbol('StateMessageGIF'); export class infoState { [StateMessage]: string = ''; [StateEntryFunc]?: () => any; + [StateMessageGIF]?: string = ''; [key: string]: infoArc; - constructor(message: string, arcs: { [key: string]: infoArc }, entryFunc?: () => any) { + constructor(message: string, arcs: { [key: string]: infoArc }, entryFunc?: () => any, messageGif?: string) { this[StateMessage] = message; Object.assign(this, arcs); this[StateEntryFunc] = entryFunc; @@ -36,9 +39,10 @@ export class infoState { export function InfoState( msg: string, // arcs: { [key: string]: infoArc }, - entryFunc?: () => any + entryFunc?: () => any, + gif?: string, ) { - return new infoState(msg, arcs, entryFunc); + return new infoState(msg, arcs, entryFunc, gif); } export interface CollectionFreeFormInfoStateProps { @@ -90,6 +94,10 @@ export class CollectionFreeFormInfoState extends ObservableReactComponent{this.State?.[StateMessage]}; + return
+ {/* state message gif */} + + {this.State?.[StateMessage]} +
; } } -- cgit v1.2.3-70-g09d2