-
Notifications
You must be signed in to change notification settings - Fork 0
Changed TextField label font size to prevent overflowing parent #108
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,35 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { TextField } from "@material-ui/core"; | ||
import { TextField, makeStyles } from "@material-ui/core"; | ||
import { pink, purple } from '@material-ui/core/colors'; | ||
|
||
export default function ItemTableFilter({ label, onChange }) { | ||
|
||
const useStyles = makeStyles({ | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove unnecessary spacing. |
||
labelRoot: { | ||
fontSize: 14, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can't arbitrarily change font sizes. Its a nightmare for accessibility and constancy. We'll need a solution that scales with whatever content we put into the filter rows. |
||
}, | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove unnecessary spacing. |
||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Combine these block closers |
||
); | ||
|
||
const classes = useStyles(); | ||
|
||
return ( | ||
<> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. React fragments |
||
|
||
<TextField | ||
label={label} | ||
onChange={onChange} | ||
classes={{ root: classes.inputLabelStyles }} | ||
InputLabelProps={{ | ||
classes: { root: classes.labelRoot, focused: classes.labelFocused }}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. classes.labelFocused doesn't exist. Should it be created in |
||
color="secondary" | ||
type="search" | ||
size="small" | ||
variant="outlined" | ||
fullWidth | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove unnecessary spacing. |
||
/> | ||
</> | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these colors needed? They've been imported but aren't used.