aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PresentationView.tsx
diff options
context:
space:
mode:
authormadelinegr <mgriswold99@gmail.com>2019-02-26 17:03:28 -0500
committermadelinegr <mgriswold99@gmail.com>2019-02-26 17:03:28 -0500
commit675d619bcac9b73893406ac029a4fd6c1cc290c6 (patch)
tree1bc0ed5252121c9e0e3ff6ae12837376730d3dc7 /src/client/views/PresentationView.tsx
parentd6c6bd0399a787d2f54655ed5b32df5355ebd711 (diff)
worked on collapsable
Diffstat (limited to 'src/client/views/PresentationView.tsx')
-rw-r--r--src/client/views/PresentationView.tsx15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/client/views/PresentationView.tsx b/src/client/views/PresentationView.tsx
index 0a9183023..d9d9715fc 100644
--- a/src/client/views/PresentationView.tsx
+++ b/src/client/views/PresentationView.tsx
@@ -18,10 +18,6 @@ export interface PresViewProps {
*/
class PresentationViewItem extends React.Component<PresViewProps> {
- //observable means render is re-called every time variable is changed
- @observable
- collapsed: boolean = false;
- //TODO: this var isn't needed
/**
* Renders a single child document. It will just append a list element.
@@ -58,6 +54,10 @@ class PresentationViewItem extends React.Component<PresViewProps> {
export class PresentationView extends React.Component<PresViewProps> {
public static Instance: PresentationView;
+ //observable means render is re-called every time variable is changed
+ @observable
+ collapsed: boolean = false;
+
/**
* Adds a document to the presentation view
**/
@@ -72,7 +72,7 @@ export class PresentationView extends React.Component<PresViewProps> {
}
//TODO: open presentation view if not already open
- Documents.PresentationView([], { width: 200, height: 200, title: "a feeform collection" })
+ this.collapsed = false;
}
/**
@@ -100,13 +100,14 @@ export class PresentationView extends React.Component<PresViewProps> {
}
render() {
- let titleStr = "";
+ let titleStr = "Title";
let title = this.props.Document.GetT<TextField>(KeyStore.Title, TextField);
if (title && title !== "<Waiting>") {
titleStr = title.Data;
}
+ let width = this.collapsed ? 0 : 100;
return (
- <div>
+ <div background-color="lightblue" max-width={width}>
<h3>{titleStr}</h3>
<ul className="no-indent">
<PresentationViewItem