From 01a4c6626d8c2146f907231e18e2cc731cbb73bb Mon Sep 17 00:00:00 2001 From: "Alinson S. Xavier" Date: Fri, 1 Apr 2022 13:53:28 -0500 Subject: [PATCH] Disable download button when no data is available --- relog-web/src/Button.js | 6 +++++- relog-web/src/Button.module.css | 5 +++++ relog-web/src/FileInputRow.js | 14 ++++++++++++-- relog-web/src/ProductBlock.js | 8 +++++++- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/relog-web/src/Button.js b/relog-web/src/Button.js index 2ca148b..c91c023 100644 --- a/relog-web/src/Button.js +++ b/relog-web/src/Button.js @@ -12,7 +12,11 @@ const Button = (props) => { } return ( - diff --git a/relog-web/src/Button.module.css b/relog-web/src/Button.module.css index e1f0b3c..b43c145 100644 --- a/relog-web/src/Button.module.css +++ b/relog-web/src/Button.module.css @@ -60,3 +60,8 @@ opacity: 100%; transition: opacity 0.5s; } + +.Button:disabled { + color: rgba(0, 0, 0, 0.25); + cursor: default; +} diff --git a/relog-web/src/FileInputRow.js b/relog-web/src/FileInputRow.js index 11d7abe..7672250 100644 --- a/relog-web/src/FileInputRow.js +++ b/relog-web/src/FileInputRow.js @@ -31,8 +31,18 @@ const FileInputRow = (props) => {