import React = require('react'); import './SchemaCSVPopUp.scss'; import { action, observable } from 'mobx'; import { observer } from 'mobx-react'; import { Doc } from '../../../../fields/Doc'; import { Button, Type } from 'browndash-components'; import { StrCast } from '../../../../fields/Types'; import { MarqueeView } from '../../collections/collectionFreeForm/MarqueeView'; interface SchemaCSVPopUpProps {} @observer export class SchemaCSVPopUp extends React.Component { static Instance: SchemaCSVPopUp; @observable public dataVizDoc: Doc | undefined = undefined; @action public setDataVizDoc = (doc: Doc) => { this.dataVizDoc = doc; }; @observable public visible: boolean = false; @action public setVisible = (vis: boolean) => { this.visible = vis; }; public addToCollection: any | undefined; /** * Transfers the doc to the user's canvas */ private transferToCanvas = () => { if (this.dataVizDoc) this.addToCollection?.(this.dataVizDoc); this.setVisible(false); }; constructor(props: SchemaCSVPopUpProps) { super(props); SchemaCSVPopUp.Instance = this; } dataBox = () => { return (
{this.heading('Schema Table as Data Visualization Doc')}
{/* {this.props.children} */}
); }; heading = (headingText: string) => (
); render() { return (
{this.dataBox()}
); } }