[ ADD ] react configuration

This commit is contained in:
Kuroi488
2020-11-16 17:14:34 +01:00
parent 89c9cfe099
commit 5078a1a96e
71 changed files with 16891 additions and 0 deletions

View File

@ -0,0 +1,10 @@
import React from "react";
import Button from '@material-ui/core/Button';
export const Btn = ({text , handleClick}) => {
return (
<Button variant="contained" color="primary" onClick={handleClick}>
{text}
</Button>
);
};

View File

@ -0,0 +1,32 @@
import React from "react";
import { TextField } from "@material-ui/core";
export const InputField = ({
name,
label,
value,
error,
handleChange,
helperText,
isMultiline,
isRequired
}) => {
return (
<TextField
className="my-3"
name={name}
type="text"
label={isRequired ? label+"*" : label}
inputProps={{ maxLength: isMultiline ? 500 : 50 }}
variant="outlined"
fullWidth
value={value}
error={error}
helperText={error && helperText}
onChange={handleChange}
multiline={isMultiline}
rows={isMultiline ? 3 : 1}
/>
);
};