From 004d135d931fd6ed3f843ab502d8e2e9e1fa18ef Mon Sep 17 00:00:00 2001
From: orangemug
Date: Mon, 24 Sep 2018 14:40:17 +0100
Subject: [PATCH] Show error if style fails to load and disabled button if
input is empty
---
src/components/Button.jsx | 1 +
src/components/modals/OpenModal.jsx | 28 +++++++++++++++++++++++++---
src/styles/_components.scss | 6 ++++++
3 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/src/components/Button.jsx b/src/components/Button.jsx
index e7690074..294c47fd 100644
--- a/src/components/Button.jsx
+++ b/src/components/Button.jsx
@@ -15,6 +15,7 @@ class Button extends React.Component {
render() {
return
- this.styleUrlElement = input} className="maputnik-input" placeholder="Enter URL..."/>
+ this.styleUrlElement = input}
+ className="maputnik-input"
+ placeholder="Enter URL..."
+ onChange={this.onChangeUrl}
+ />
-
+
diff --git a/src/styles/_components.scss b/src/styles/_components.scss
index 302ec528..58ab88f0 100644
--- a/src/styles/_components.scss
+++ b/src/styles/_components.scss
@@ -77,6 +77,12 @@
background-color: lighten($color-midgray, 12);
color: $color-white;
}
+
+ &:disabled {
+ background-color: darken($color-midgray, 5);
+ color: $color-midgray;
+ cursor: not-allowed;
+ }
}
.maputnik-big-button {