You can use the makeStyles
function from @material-ui/core/styles
to create custom styles for your Tab
component and use the color
property to set a new font color. Here's an example code:
import { makeStyles } from '@material-ui/core/styles';
import { Tab } from '@material-ui/core';
const useStyles = makeStyles((theme) => ({
myCustomTab: {
color: 'red', // set your desired font color here
},
}));
function MyComponent() {
const classes = useStyles();
return (
<Tab label="My Tab" className={classes.myCustomTab} />
);
}
In this example, the myCustomTab
style class is created with a color
property set to 'red'
. Then, the Tab
component is rendered with the myCustomTab
class name applied to it.
Asked: 2023-07-03 13:25:03 +0000
Seen: 12 times
Last updated: Jul 03 '23