Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature/improve load solution ui#103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ShMcK merged 2 commits intomasterfromfeature/improve-load-solution-ui
Feb 2, 2020
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletionsweb-app/src/components/StepHelp/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
import { Balloon } from '@alifd/next'
import * as React from 'react'
import { css, jsx } from '@emotion/core'
import Icon from '../Icon'
import Button from '../Button'

const styles = {
Expand DownExpand Up@@ -28,17 +29,32 @@ interface Props {
}

const StepHelp = (props: Props) => {
const [visible, setVisible] = React.useState(false)
// TODO extract or replace load solution
const [loadedSolution, setLoadedSolution] = React.useState()
const onClickHandler = () => {
if (!loadedSolution) {
setLoadedSolution(true)
props.onLoadSolution()
setVisible(false)
}
}
const promptLeft = <Button css={styles.iconButton}>i</Button>
const promptLeft = (
<Button css={styles.iconButton} onClick={() => setVisible(!visible)}>
<Icon type="help" />
</Button>
)
return (
<Balloon trigger={promptLeft} align="l" alignEdge triggerType="click" css={{ width: 150 }} closable={false}>
<Balloon
trigger={promptLeft}
align="l"
alignEdge
triggerType="click"
css={{ width: 150 }}
closable
visible={visible}
onClose={() => setVisible(false)}
>
<div>
<h4 css={styles.balloonTitle}>Stuck?</h4>
<div css={styles.balloonOptions}>
Expand Down
2 changes: 1 addition & 1 deletionweb-app/src/containers/Overview/OverviewPage.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,7 +13,7 @@ const styles = {
display: 'flex' as 'flex',
flexDirection: 'column' as 'column',
width: '100%',
paddingBottom:footerHeight,
paddingBottom:'5rem',
},
summary: {
padding: '0rem 1rem 1rem 1rem',
Expand Down
9 changes: 2 additions & 7 deletionsweb-app/stories/Step.stories.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,13 +31,8 @@ const paragraphText = `Markdown included \`code\`, *bold*, & _italics_.
storiesOf('Level', module)
.addDecorator(SideBarDecorator)
.addDecorator(withKnobs)
.add('Step', () => (
<Step
order={1}
content={text('text', stepText)}
status={select('mode', { ACTIVE: 'ACTIVE', COMPLETE: 'COMPLETE', INCOMPLETE: 'INCOMPLETE' }, 'COMPLETE', 'step')}
onLoadSolution={action('onLoadSolution')}
/>
.add('Active Step', () => (
<Step order={1} content={text('text', stepText)} status="ACTIVE" onLoadSolution={action('onLoadSolution')} />
))
.add('Step Markdown', () => (
<Step
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp