diff options
| author | Amir Zarrinkafsh <nightah@me.com> | 2021-01-02 21:58:24 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-02 21:58:24 +1100 |
| commit | 689fd7cb954afd5eaeab49e122cdd2ee86bc6c82 (patch) | |
| tree | 39ecf8710d9758edc2eb87882cadabe870ab9d1e /web/src/components/FixedTextField.tsx | |
| parent | a5ea31e482df16acda15b77b3a7db24a2a5b7be7 (diff) | |
[CI] Add linting option for frontend and enforce styling (#1565)
We now extend the default Eslint configuration and enforce styling with prettier for all of our frontend code.
Diffstat (limited to 'web/src/components/FixedTextField.tsx')
| -rw-r--r-- | web/src/components/FixedTextField.tsx | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/web/src/components/FixedTextField.tsx b/web/src/components/FixedTextField.tsx index 5e9c0f3b6..54febc1d5 100644 --- a/web/src/components/FixedTextField.tsx +++ b/web/src/components/FixedTextField.tsx @@ -1,34 +1,37 @@ import React from "react"; -import TextField, { TextFieldProps } from "@material-ui/core/TextField"; + import { makeStyles } from "@material-ui/core"; +import TextField, { TextFieldProps } from "@material-ui/core/TextField"; /** * This component fixes outlined TextField * https://github.com/mui-org/material-ui/issues/14530#issuecomment-463576879 - * + * * @param props the TextField props */ const FixedTextField = function (props: TextFieldProps) { const style = useStyles(); return ( - <TextField {...props} + <TextField + {...props} InputLabelProps={{ classes: { - root: style.label - } + root: style.label, + }, }} - inputProps={{autoCapitalize: props.autoCapitalize}}> + inputProps={{ autoCapitalize: props.autoCapitalize }} + > {props.children} </TextField> ); -} +}; -export default FixedTextField +export default FixedTextField; -const useStyles = makeStyles(theme => ({ +const useStyles = makeStyles((theme) => ({ label: { backgroundColor: theme.palette.background.default, paddingLeft: theme.spacing(0.1), paddingRight: theme.spacing(0.1), - } -}));
\ No newline at end of file + }, +})); |
