diff options
| author | Fawn <fangrui_tong@brown.edu> | 2019-04-01 20:47:01 -0400 |
|---|---|---|
| committer | Fawn <fangrui_tong@brown.edu> | 2019-04-01 20:47:01 -0400 |
| commit | 16e861bd4c16483783cdc0534af614625dd0f775 (patch) | |
| tree | bd3fb8298d91fc0677458cd5126502b1d4a2df42 /src/client/views/Templates.tsx | |
| parent | 5246c3c38acda6cbd8636577ff8f658657609d88 (diff) | |
created template adding menu
Diffstat (limited to 'src/client/views/Templates.tsx')
| -rw-r--r-- | src/client/views/Templates.tsx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/client/views/Templates.tsx b/src/client/views/Templates.tsx index 8260f9414..d717fb778 100644 --- a/src/client/views/Templates.tsx +++ b/src/client/views/Templates.tsx @@ -2,21 +2,30 @@ import { observer } from "mobx-react"; import { observable } from "mobx"; import { action, computed } from "mobx"; import React = require("react"); +import { StringLiteral } from "babel-types"; export class Template { - constructor(layout: string) { + constructor(name: string, layout: string) { + this._name = name; this._layout = layout; } - private _layout: string = ""; + private _name: string; + private _layout: string; + + get Name(): string { + return this._name; + } get Layout(): string { return this._layout; } + } export namespace Templates { - export const OuterCaption = new Template(` + export const OuterCaption = new Template("Outer caption", + ` <div> <div style="margin:auto; height:calc(100%); width:100%;"> {layout} @@ -26,7 +35,8 @@ export namespace Templates { </div> </div> `); - export const InnerCaption = new Template(` + export const InnerCaption = new Template("Inner caption", + ` <div> <div style="margin:auto; height:calc(100% - 25px); width:100%;"> {layout} |
