Add select a file label.

nb/hide-http
Neeraj Baid 11 years ago
parent 0202e1930a
commit bea77cae07

@ -213,3 +213,29 @@ p {
} }
} }
} }
label.myLabel input[type="file"] {
position: fixed;
top: -1000px;
}
.myLabel {
border: 2px solid #CCC;
border-radius: 4px;
padding: 2px 5px;
margin: 2px;
background: #EEE;
display: inline-block;
}
.myLabel:hover {
background: #CCC;
}
.myLabel:active {
background: #CCF;
}
.myLabel :invalid + span {
color: #A44;
}
.myLabel :valid + span {
color: #4A4;
}

@ -48,7 +48,13 @@ export default class UploadPage extends React.Component {
<h1>FilePizza</h1> <h1>FilePizza</h1>
<p>Your files, delivered.</p> <p>Your files, delivered.</p>
<p>Drag the file into this window to get started.</p> <p>Drag the file into this window to get started.</p>
<p>Or
<label className="myLabel">
<input type="file" required/>
<span>select a file</span>
</label>
.
</p>
</Centered> </Centered>
</DropZone> </DropZone>

Loading…
Cancel
Save