Browse Source

expandable section

Feroze Mohideen 3 years ago
parent
commit
229860c3f2
1 changed files with 17 additions and 9 deletions
  1. 17 9
      dashboard/src/components/porter/ExpandableSection.tsx

+ 17 - 9
dashboard/src/components/porter/ExpandableSection.tsx

@@ -40,15 +40,23 @@ const ExpandableSection: React.FC<Props> = ({
       {noWrapper ? (
         <Container row spaced={spaced}>
           {Header}
-          {copy ? (<ExpandButton onClick={() => setIsExpanded(!isExpanded)}>
-            {isExpanded ? collapseText : expandText}
-          </ExpandButton>) : (<div>          <ExpandButton onClick={() => setIsExpanded(!isExpanded)}>
-            {isExpanded ? collapseText : expandText}
-          </ExpandButton>          <ExpandButton onClick={() => setIsExpanded(!isExpanded)}>
-              {isExpanded ? collapseText : expandText}
-            </ExpandButton></div>)}
-
-
+          {copy ?
+            (
+              <div>
+                <ExpandButton onClick={() => setIsExpanded(!isExpanded)}>
+                  {isExpanded ? collapseText : expandText}
+                </ExpandButton>
+                <ExpandButton onClick={() => setIsExpanded(!isExpanded)}>
+                  {isExpanded ? collapseText : expandText}
+                </ExpandButton>
+              </div>
+            ) :
+            (
+              <ExpandButton onClick={() => setIsExpanded(!isExpanded)}>
+                {isExpanded ? collapseText : expandText}
+              </ExpandButton>
+            )
+          }
         </Container>
       ) : (
         <HeaderRow