diff options
| author | alinayejin <alina_kim@brown.edu> | 2023-12-18 17:35:58 -0500 |
|---|---|---|
| committer | alinayejin <alina_kim@brown.edu> | 2023-12-18 17:35:58 -0500 |
| commit | 270ee7f9d01ed8d3432f162f40cfe28db9503cfc (patch) | |
| tree | 1dda63c3031e5196469ed040e86ba500bb52a252 /src/client/views/collections/collectionFreeForm/CollectionFreeFormInfoState.tsx | |
| parent | 98aff1d25b4b371f9d0846d229c1c3b1ddfec583 (diff) | |
add state message gif
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormInfoState.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormInfoState.tsx | 16 |
1 files changed, 12 insertions, 4 deletions
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<Collec this.clearState(); } render() { - return <div className="infoUI">{this.State?.[StateMessage]}</div>; + return <div className="infoUI"> + {/* <img src={this.State?.[StateMessageGIF]} alt='state message gif'></img> */} + <img src="./assets/link.png"></img> + {this.State?.[StateMessage]} + </div>; } } |
