-
-
Notifications
You must be signed in to change notification settings - Fork 662
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from polarising-oss/AKHQ-58-Nodes-Details-Upda…
…teConfigs-Frontend AKHQ-58 - Nodes Details UpdateConfigs Frontend
- Loading branch information
Showing
7 changed files
with
182 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,31 @@ | ||
import React from 'react'; | ||
|
||
const Input = props => { | ||
const {name, label, placeholder, error, ...rest} = props; | ||
const { name, label, placeholder, error, ...rest } = props; | ||
|
||
return ( | ||
<div className="form-group row"> | ||
<label htmlFor={name} className="col-sm-2 col-form-label">{label}</label> | ||
<div className="col-sm-10"> | ||
<input | ||
{...rest} | ||
name={name} | ||
id={name} | ||
className="form-control" | ||
placeholder={placeholder} | ||
/> | ||
return ( | ||
<div className="form-group row"> | ||
{label !== '' ? ( | ||
<label htmlFor={name} className="col-sm-2 col-form-label"> | ||
{label} | ||
</label> | ||
) : ( | ||
<div></div> | ||
)} | ||
<div className="col-sm-10"> | ||
<input | ||
{...rest} | ||
key={name} | ||
name={name} | ||
id={name} | ||
className="form-control" | ||
placeholder={placeholder} | ||
/> | ||
|
||
{error && <div className="alert alert-danger mt-1 p-1">{error}</div>} | ||
</div> | ||
|
||
</div> | ||
); | ||
{error && <div className="alert alert-danger mt-1 p-1">{error}</div>} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Input; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.