From 15883a13e1bb9bd74621a3a23b87a82e47f88cb7 Mon Sep 17 00:00:00 2001 From: Daan Vanden Bosch Date: Wed, 29 May 2019 17:59:47 +0200 Subject: [PATCH] BluePrint React components are now used everywhere instead of css classes. Styling is now done in css files instead of setting the style prop. --- src/ui/ApplicationComponent.css | 9 +--- src/ui/ApplicationComponent.tsx | 91 +++++++++++++++------------------ src/ui/EntityInfoComponent.css | 11 ++++ src/ui/EntityInfoComponent.tsx | 26 +++------- src/ui/QuestInfoComponent.css | 20 ++++++++ src/ui/QuestInfoComponent.tsx | 50 +++++------------- 6 files changed, 96 insertions(+), 111 deletions(-) create mode 100644 src/ui/QuestInfoComponent.css diff --git a/src/ui/ApplicationComponent.css b/src/ui/ApplicationComponent.css index 7b6b1ab9..66edceb2 100644 --- a/src/ui/ApplicationComponent.css +++ b/src/ui/ApplicationComponent.css @@ -18,13 +18,8 @@ margin-left: 2; } -.ApplicationComponent-file-upload { - display: inline-block; - width: 100%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - word-wrap: normal; +.ApplicationComponent-button-bar > * { + margin-right: 10px; } .ApplicationComponent-main { diff --git a/src/ui/ApplicationComponent.tsx b/src/ui/ApplicationComponent.tsx index a52e4e01..089577f3 100644 --- a/src/ui/ApplicationComponent.tsx +++ b/src/ui/ApplicationComponent.tsx @@ -1,4 +1,4 @@ -import { Button, Dialog, Intent } from '@blueprintjs/core'; +import { Button, Dialog, Intent, Classes, Navbar, NavbarGroup, NavbarHeading, FileInput, HTMLSelect, FormGroup, InputGroup } from '@blueprintjs/core'; import { observer } from 'mobx-react'; import React, { ChangeEvent, KeyboardEvent } from 'react'; import { saveCurrentQuestToFile, setCurrentAreaId } from '../actions/appState'; @@ -24,49 +24,45 @@ export class ApplicationComponent extends React.Component<{}, { render() { const quest = appStateStore.currentQuest; const model = appStateStore.currentModel; - const areas = quest ? Array.from(quest.areaVariants).map(a => a.area) : undefined; + const areas = quest && Array.from(quest.areaVariants).map(a => a.area); const area = appStateStore.currentArea; - const areaId = area ? String(area.id) : undefined; + const areaId = area && String(area.id); return ( -
- + onClick={this.onSaveAsClick} + /> + ) : null} + +
@@ -79,27 +75,24 @@ export class ApplicationComponent extends React.Component<{}, { -
- +
-
-
+
+