show errors if file name is invalid
This commit is contained in:
parent
32d45ea332
commit
ef7d121927
2 changed files with 6 additions and 0 deletions
|
@ -24,6 +24,7 @@ class NewFileForm extends React.Component {
|
|||
{...name}
|
||||
/>
|
||||
<input type="submit" value="Add File" aria-label="add file" />
|
||||
{name.touched && name.error && <span className="form-error">{name.error}</span>}
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -32,6 +32,11 @@
|
|||
margin-bottom: #{20 / $base-font-size}rem;
|
||||
}
|
||||
|
||||
.new-file-form, .new-file-folder {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.new-file-form__name-label, .new-folder-form__name-label {
|
||||
@extend %hidden-element;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue