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

Commit9dc4ef5

Browse files
committed
tighten hint css
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parentf705123 commit9dc4ef5

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

‎web-app/src/containers/Tutorial/components/Hints.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
import*asReactfrom'react'
2+
import{css,jsx}from'@emotion/core'
23
importMarkdownfrom'../../../components/Markdown'
34
importButtonfrom'../../../components/Button'
45

56
conststyles={
67
hints:{
7-
marginTop:'1rem',
8+
marginTop:'0.5rem',
89
},
910
hintList:{
1011
marginBottom:'0.5rem',
1112
},
1213
hint:{
13-
margin:'0.5rem 0',
14+
marginBottom:'0.5rem',
1415
backgroundColor:'rgba(255,229,100,0.3)',
1516
borderLeft:'#ffe564',
16-
padding:'0.5rem',
17+
padding:'0 0.5rem',
1718
},
1819
}
1920

@@ -32,13 +33,13 @@ const Hints = (props: Props) => {
3233
props.setHintIndex(props.hintIndex+1)
3334
}
3435
return(
35-
<divstyle={styles.hints}>
36-
<divstyle={styles.hintList}>
36+
<divcss={styles.hints}>
37+
<divcss={styles.hintList}>
3738
{/* only show revealed hints */}
3839
{props.hints.map((h,i)=>{
3940
returni<=props.hintIndex ?(
40-
<divkey={i}style={styles.hint}>
41-
<Markdown>{h}</Markdown>
41+
<divkey={i}css={styles.hint}>
42+
<Markdowncss={styles.hint}>{h}</Markdown>
4243
</div>
4344
) :null
4445
})}

‎web-app/stories/Step.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ storiesOf('Step', module)
123123
onLoadSolution={action('onLoadSolution')}
124124
subtasks={null}
125125
hints={['First hint!','Second hint!']}
126-
hintIndex={0}
126+
hintIndex={1}
127127
setHintIndex={action('setHintIndex')}
128128
/>
129129
))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp