dropzone text

This commit is contained in:
Robin Appelman 2021-08-01 23:49:03 +02:00
commit 58439347fc
3 changed files with 15 additions and 3 deletions

View file

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Hello wasm-pack!</title> <title>Demo Inspector</title>
</head> </head>
<body> <body>
<noscript>This page contains webassembly and javascript content, please enable javascript in your browser.</noscript> <noscript>This page contains webassembly and javascript content, please enable javascript in your browser.</noscript>

View file

@ -158,9 +158,10 @@ function DemoDropzone(
<input {...getInputProps()} /> <input {...getInputProps()} />
{ {
isDragActive ? isDragActive ?
<p>Drop the files here ...</p> : <p>Drop the demo file here ...</p> :
<p>Drag 'n' drop some files here, or click to select files</p> <p>Drag 'n' drop a demo here, or click to a file</p>
} }
<p className="warning">Warning, loading a 30m demo file can easily take over a gigabyte of memory</p>
</div> </div>
) )
} }

View file

@ -76,6 +76,17 @@ html, body, #root {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
cursor: pointer;
p {
font-size: 1.5em;
}
p.warning {
font-size: 1em;
opacity: 0.8;
}
} }