diff --git a/web-app/src/App.tsx b/web-app/src/App.tsx index ce9e2c4d..2eae39bd 100644 --- a/web-app/src/App.tsx +++ b/web-app/src/App.tsx @@ -1,10 +1,10 @@ import * as React from 'react' import * as CR from 'typings' -import Debugger from './components/Debugger' +// import Debugger from './components/Debugger' import Routes from './Routes' +import DataContext, { initialData, initialState } from './utils/DataContext' import { send } from './utils/vscode' -import DataContext, { initialState, initialData } from './utils/DataContext' interface ReceivedEvent { data: CR.Action diff --git a/web-app/src/components/Divider.tsx b/web-app/src/components/Divider.tsx new file mode 100644 index 00000000..a46b558d --- /dev/null +++ b/web-app/src/components/Divider.tsx @@ -0,0 +1,12 @@ +import * as React from 'react' + +const styles = { + divider: { + backgroundColor: '#e8e8e8', + height: '0.1rem', + }, +} + +const Divider = () =>
+ +export default Divider diff --git a/web-app/src/components/Level/LevelStageSummary.tsx b/web-app/src/components/Level/LevelStageSummary.tsx new file mode 100644 index 00000000..0d36180a --- /dev/null +++ b/web-app/src/components/Level/LevelStageSummary.tsx @@ -0,0 +1,51 @@ +import { Button } from '@alifd/next' +import * as React from 'react' +import CC from '../../../../typings/context' + +import Markdown from '../Markdown' + +const styles = { + active: { + backgroundColor: '#e6f7ff', + }, + card: { + padding: '0.5rem 1rem', + }, + completed: { + backgroundColor: '#f6ffed', + }, + disabled: { + // backgroundColor: 'blue', + }, + options: {}, + title: { + margin: 0, + }, +} + +interface Props { + stage: CC.StageWithStatus + onNext(): void +} + +const LevelStageSummary = (props: Props) => { + const { stage, onNext } = props + const { complete, active } = stage.status + const cardStyle = { + ...styles.card, + ...(active ? styles.active : styles.disabled), + ...(complete ? styles.completed : {}), + } + return ( +{stage.content.text}
- {stage.status.active && } - {stage.status.complete &&{summary.description}
- -{summary.description}
+