-
Notifications
You must be signed in to change notification settings - Fork 3
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 #99 from SimonDmz/feature-identification
Feature identification
- Loading branch information
Showing
93 changed files
with
2,744 additions
and
1,812 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
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 was deleted.
Oops, something went wrong.
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
32 changes: 32 additions & 0 deletions
32
src/components/common/sharedComponents/EditableBooleanField.js
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from 'react'; | ||
import TextField from '@material-ui/core/TextField'; | ||
import Typography from '@material-ui/core/Typography'; | ||
import { makeStyles } from '@material-ui/core'; | ||
|
||
const useStyles = makeStyles(() => ({ | ||
row: { | ||
display: 'flex', | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
gap: '1em', | ||
}, | ||
})); | ||
|
||
export const EditableBooleanField = ({ id, label, defaultValue = undefined, onChangeFunction }) => { | ||
const classes = useStyles(); | ||
return ( | ||
<div className={classes.row}> | ||
<Typography color="textSecondary">{label}</Typography> | ||
<TextField | ||
margin="dense" | ||
id={id} | ||
name={id} | ||
InputLabelProps={{ color: 'secondary' }} | ||
type="checkbox" | ||
fullWidth | ||
inputProps={{ checked: defaultValue }} | ||
onChange={event => onChangeFunction(event)} | ||
/> | ||
</div> | ||
); | ||
}; |
32 changes: 32 additions & 0 deletions
32
src/components/common/sharedComponents/EditableTextField.js
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from 'react'; | ||
import TextField from '@material-ui/core/TextField'; | ||
import Typography from '@material-ui/core/Typography'; | ||
import { makeStyles } from '@material-ui/core'; | ||
|
||
const useStyles = makeStyles(() => ({ | ||
row: { | ||
display: 'flex', | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
gap: '1em', | ||
}, | ||
})); | ||
|
||
export const EditableTextField = ({ id, label, defaultValue = '', onChangeFunction }) => { | ||
const classes = useStyles(); | ||
return ( | ||
<div className={classes.row}> | ||
<Typography color="textSecondary">{label}</Typography> | ||
<TextField | ||
margin="dense" | ||
id={id} | ||
name={id} | ||
InputLabelProps={{ color: 'secondary' }} | ||
type="text" | ||
fullWidth | ||
defaultValue={defaultValue} | ||
onChange={event => onChangeFunction(event)} | ||
/> | ||
</div> | ||
); | ||
}; |
35 changes: 35 additions & 0 deletions
35
src/components/common/sharedComponents/EditableTextFieldWithClickableIcon.js
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { EditableTextField } from './EditableTextField'; | ||
import React from 'react'; | ||
import { makeStyles } from '@material-ui/core'; | ||
|
||
const useStyles = makeStyles(theme => ({ | ||
row: { | ||
display: 'flex', | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
gap: '1em', | ||
}, | ||
})); | ||
|
||
export const EditableTextFieldWithClickableIcon = ({ | ||
id, | ||
label, | ||
defaultValue = '', | ||
icons = [], | ||
onChangeFunction, | ||
}) => { | ||
const classes = useStyles(); | ||
return ( | ||
<div className={classes.row}> | ||
<EditableTextField | ||
id={id} | ||
label={label} | ||
defaultValue={defaultValue} | ||
onChangeFunction={onChangeFunction} | ||
/> | ||
{icons.map(Icon => ( | ||
<Icon /> | ||
))} | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.