From 598becd838730a44c8bb43143ddc156badca8e4d Mon Sep 17 00:00:00 2001 From: shmck Date: Sun, 12 Jul 2020 09:03:26 -0700 Subject: [PATCH 1/2] add show/hide step review toggle Signed-off-by: shmck --- .../containers/Tutorial/containers/Review.tsx | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/web-app/src/containers/Tutorial/containers/Review.tsx b/web-app/src/containers/Tutorial/containers/Review.tsx index e20dc4c2..453d7faa 100644 --- a/web-app/src/containers/Tutorial/containers/Review.tsx +++ b/web-app/src/containers/Tutorial/containers/Review.tsx @@ -1,5 +1,6 @@ import * as React from 'react' import * as T from 'typings' +import { Switch } from '@alifd/next' import Steps from '../components/Steps' import Content from '../components/Content' @@ -15,7 +16,7 @@ const styles = { header: { display: 'flex' as 'flex', alignItems: 'center', - justifyContent: 'flex-start', + justifyContent: 'space-between', height: '2rem', backgroundColor: '#EBEBEB', fontSize: '1rem', @@ -25,22 +26,39 @@ const styles = { title: { marginLeft: '0.5rem', }, + control: { + display: 'flex' as 'flex', + alignItems: 'center', + fontSize: '70%', + }, + levels: { + paddingBottom: '2rem', + }, } const ReviewPage = (props: Props) => { + const [stepVisibility, setStepVisibility] = React.useState(false) return (
-
Review
- {props.levels.map((level: T.LevelUI, index: number) => ( -
-
- - -
- {/* divider */} - {index < props.levels.length - 1 ?
: null} +
+
Review
+
+ Show steps  + setStepVisibility(checked)} />
- ))} +
+
+ {props.levels.map((level: T.LevelUI, index: number) => ( +
+
+ + {stepVisibility ? : null} +
+ {/* divider */} + {index < props.levels.length - 1 ?
: null} +
+ ))} +
) } From 1e5fe881a96fb5f346827a32adc92ac654a0028a Mon Sep 17 00:00:00 2001 From: shmck Date: Sun, 12 Jul 2020 09:09:18 -0700 Subject: [PATCH 2/2] fix menu icon button color Signed-off-by: shmck --- web-app/src/containers/Tutorial/index.tsx | 3 +-- web-app/src/containers/Tutorial/style.css | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 web-app/src/containers/Tutorial/style.css diff --git a/web-app/src/containers/Tutorial/index.tsx b/web-app/src/containers/Tutorial/index.tsx index e5eac093..baf1bfe7 100644 --- a/web-app/src/containers/Tutorial/index.tsx +++ b/web-app/src/containers/Tutorial/index.tsx @@ -1,6 +1,5 @@ import * as React from 'react' import * as T from 'typings' -import './style.css' import * as selectors from '../../services/selectors' import SideMenu from './components/SideMenu' import Level from './components/Level' @@ -118,7 +117,7 @@ const TutorialPage = (props: PageProps) => {
setMenuVisible(!menuVisible)}> - + {tutorial.summary.title}
diff --git a/web-app/src/containers/Tutorial/style.css b/web-app/src/containers/Tutorial/style.css deleted file mode 100644 index 555b22c1..00000000 --- a/web-app/src/containers/Tutorial/style.css +++ /dev/null @@ -1,4 +0,0 @@ -/* remove visited styles from menu button */ -i.next-icon:visited { - text-decoration: none; -}