given card code as in here : card
how can I update the card style or any material UI style as from
const styles = theme => ({
card: {
Here the Typescript solution:
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Button from '@material-ui/core/Button';
import {Theme} from '@material-ui/core';
export interface StyleProps {
height: number;
}
const useStyles = makeStyles(theme => ({
root: {
background: 'green',
height: ({height}) => height,
},
}));
export default function Hook() {
const props = {
height: 48
}
const classes = useStyles(props);
return ;
}
If you want to play with it, try it in this CodeSandbox