From 706bdd0224a923c9faa6265b4c6b91f4f74ea7bd Mon Sep 17 00:00:00 2001 From: L Martins Date: Fri, 6 Oct 2023 22:12:55 -0300 Subject: [PATCH] fix: replacing inline validations to const --- website/index.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/website/index.js b/website/index.js index ba733ca9..1ff8d17b 100644 --- a/website/index.js +++ b/website/index.js @@ -60,6 +60,10 @@ class Page extends React.Component { render() { const { content } = this.state; + const menuBarBackground = content ? common.white : common.black; + const toggleButtonColor = content ? "inherit" : "yellow"; + const toggleButtonContent = content ? "VIEW CONTENT JSON" : "EDITOR"; + const exampleBlockClassName = content ? "" : "container--dark"; return ( @@ -78,21 +82,18 @@ class Page extends React.Component { - + - {content ? "VIEW CONTENT JSON" : "EDITOR"} + {toggleButtonContent} -
+