react-mentions
react-mentions copied to clipboard
Possibility to use material-ui/core makeStyles function to create styles for MentionsInput
I would like to use material-ui's function makeStyles as shown here below:
const useStyles = makeStyles((theme) => ({
control: {
backgroundColor: '#fff',
fontSize: 20,
fontWeight: 'normal',
},
}));
const classes = useStyles();
return (
<MentionsInput
value={props.value}
fullWidth
onChange={props.onChange}
placeholder={props.placeholder}
style={classes}
allowSuggestionsAboveCursor
>
<Mention
trigger='@'
data={props.suggestions}
className="mentions__mention"
/>
</MentionsInput>
)
So that I can use theme variables to change colors and stuff. Right now, it seems we are not able to do that. Of course, it works without using makeStyles but we would lose the ability to adjustmentionsInput styles on theme changes