fix: Fixed issue with AutoCompleteIcon component props.
Signed-off-by: Marley Powell <Marley.Powell@exclaimer.com>
This commit is contained in:
+13
-10
@@ -15,15 +15,18 @@
|
||||
*/
|
||||
|
||||
import DoneAllIcon from '@material-ui/icons/DoneAll';
|
||||
import { withStyles } from '@material-ui/core/styles';
|
||||
import React from 'react';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
|
||||
export const AutoCompleteIcon = withStyles(
|
||||
theme => ({
|
||||
root: (props: { hasAutoComplete: boolean }) => ({
|
||||
color: props.hasAutoComplete
|
||||
? theme.palette.success.main
|
||||
: theme.palette.grey[400],
|
||||
}),
|
||||
const useStyles = makeStyles(theme => ({
|
||||
root: (props: { hasAutoComplete: boolean }) => ({
|
||||
color: props.hasAutoComplete
|
||||
? theme.palette.success.main
|
||||
: theme.palette.grey[400],
|
||||
}),
|
||||
{ name: 'AutoCompleteIcon' },
|
||||
)(DoneAllIcon);
|
||||
}));
|
||||
|
||||
export const AutoCompleteIcon = (props: { hasAutoComplete: boolean }) => {
|
||||
const classes = useStyles(props);
|
||||
return <DoneAllIcon className={classes.root} />;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user