From 5c98a4cecb8e79b28d8706f3bd6235e3ed4569db Mon Sep 17 00:00:00 2001 From: johnytiago Date: Thu, 17 May 2018 11:58:18 +0100 Subject: [PATCH] feat(instances): refactor card headers #1417 --- packages/resource-step/src/index.js | 65 +++++++++++++---------------- 1 file changed, 30 insertions(+), 35 deletions(-) diff --git a/packages/resource-step/src/index.js b/packages/resource-step/src/index.js index 04f1b64d..20ecf0e6 100644 --- a/packages/resource-step/src/index.js +++ b/packages/resource-step/src/index.js @@ -46,47 +46,42 @@ export const Header = ({ icon = null, children }) => ( - {icon} - + {icon}

{children}

- - - - - - - {expanded ? 'Save and Collase' : 'Expand'} - - - - + {/* improve this */} + {optional ? ( + + + + - - - +
+ +

Optional

+
+ + ) : null}
- {isValid && !expanded && saved ? ( - - - - ) : null} - {/* improve this */} - {!saved && optional ? ( - -

Optional

-
- ) : null} + + + + {expanded ? 'Save and Collase' : 'Edit'} + + + + + + + + {!expanded && !isValid ? ( @@ -94,7 +89,7 @@ export const Header = ({ icon = null, children }) => ( ) : null} {expanded || saved ? ( - + ) : null} @@ -173,7 +168,7 @@ export default class Step extends PureComponent { > - {children} + {children}