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

Commita1f554b

Browse files
committed
fix default chrome bug with upload file
1 parentb4dff54 commita1f554b

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

‎web-app/src/containers/SelectTutorial/forms/TutorialFile.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,20 @@ interface Props {
88
onLoadSummary(data:TT.Tutorial):void
99
}
1010

11+
conststyles={
12+
uploadFileButton:{
13+
padding:'0.3rem 0.5rem',
14+
outline:'1px dotted rgb(51, 51, 51)',
15+
borderRadius:'0.2rem',
16+
fontWeight:400,
17+
fontFamily:
18+
'-apple-system, system-ui, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;',
19+
},
20+
}
21+
1122
constTutorialFile=(props:Props)=>{
1223
constonChange=(evt:any)=>{
24+
evt.preventDefault()
1325
constfiles=evt.target.files
1426

1527
if(!files.length){
@@ -29,7 +41,12 @@ const TutorialFile = (props: Props) => {
2941
return(
3042
<Formstyle={{maxWidth:'600px'}}>
3143
<FormItemlabel="Load coderoad config.json">
32-
<inputtype="file"accept="application/json"onChange={onChange}/>
44+
<br/>
45+
<labelstyle={styles.uploadFileButton}>
46+
Upload
47+
<inputstyle={{display:'none'}}type="file"accept="application/json"onChange={onChange}/>
48+
</label>
49+
<br/>
3350
</FormItem>
3451
<br/>
3552
</Form>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp