Commit 1b92bc62 by Torkel Ödegaard

edit mode styling

parent d70dfd5f
...@@ -20,6 +20,7 @@ export interface EditorToolBarView { ...@@ -20,6 +20,7 @@ export interface EditorToolBarView {
interface State { interface State {
openView?: EditorToolBarView; openView?: EditorToolBarView;
test: boolean;
} }
export class EditorTabBody extends PureComponent<Props, State> { export class EditorTabBody extends PureComponent<Props, State> {
...@@ -28,9 +29,14 @@ export class EditorTabBody extends PureComponent<Props, State> { ...@@ -28,9 +29,14 @@ export class EditorTabBody extends PureComponent<Props, State> {
this.state = { this.state = {
openView: null, openView: null,
test: false,
}; };
} }
componentDidMount() {
this.setState({ test: true });
}
onToggleToolBarView = (item: EditorToolBarView) => { onToggleToolBarView = (item: EditorToolBarView) => {
this.setState({ this.setState({
openView: item === this.state.openView ? null : item, openView: item === this.state.openView ? null : item,
...@@ -96,7 +102,7 @@ export class EditorTabBody extends PureComponent<Props, State> { ...@@ -96,7 +102,7 @@ export class EditorTabBody extends PureComponent<Props, State> {
render() { render() {
const { children, toolbarItems, main, heading } = this.props; const { children, toolbarItems, main, heading } = this.props;
const { openView } = this.state; const { openView, test } = this.state;
return ( return (
<> <>
<div className="toolbar"> <div className="toolbar">
...@@ -110,7 +116,11 @@ export class EditorTabBody extends PureComponent<Props, State> { ...@@ -110,7 +116,11 @@ export class EditorTabBody extends PureComponent<Props, State> {
<FadeIn in={openView !== null} duration={200}> <FadeIn in={openView !== null} duration={200}>
<div className="panel-editor__toolbar-view">{openView && this.renderOpenView(openView)}</div> <div className="panel-editor__toolbar-view">{openView && this.renderOpenView(openView)}</div>
</FadeIn> </FadeIn>
<div className="panel-editor__content">{children}</div> <div className="panel-editor__content">
<FadeIn in={test} duration={50}>
{children}
</FadeIn>
</div>
</CustomScrollbar> </CustomScrollbar>
</div> </div>
</> </>
......
...@@ -238,7 +238,7 @@ export class QueriesTab extends PureComponent<Props, State> { ...@@ -238,7 +238,7 @@ export class QueriesTab extends PureComponent<Props, State> {
}; };
return ( return (
<EditorTabBody heading="Queries" main={dsInformation} toolbarItems={[queryInspector, dsHelp, options]}> <EditorTabBody heading="Queries" main={dsInformation} toolbarItems={[options, queryInspector, dsHelp]}>
<div ref={element => (this.element = element)} style={{ width: '100%' }} /> <div ref={element => (this.element = element)} style={{ width: '100%' }} />
</EditorTabBody> </EditorTabBody>
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment