Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

example custom theme material ui

import * as React from 'react';
import Checkbox from '@mui/material/Checkbox';
import { createTheme, ThemeProvider, styled } from '@mui/material/styles';
import { orange } from '@mui/material/colors';

const CustomCheckbox = styled(Checkbox)(({ theme }) => ({
  color: theme.status.danger,
  '&.Mui-checked': {
    color: theme.status.danger,
  },
}));

const theme = createTheme({
  status: {
    danger: orange[500],
  },
});

export default function CustomStyles() {
  return (
    <ThemeProvider theme={theme}>
      <CustomCheckbox defaultChecked />
    </ThemeProvider>
  );
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: js pass variable from iframe to parent window 
Javascript :: insert a data into mongo using express 
Javascript :: quote 
Javascript :: pass array as argument javascript 
Javascript :: javascript map() method 
Javascript :: node express chat app 
Javascript :: dom methods 
Javascript :: dynamic routing 
Javascript :: react routes not found on refresh 
Javascript :: validate country wise phone code javascript 
Javascript :: array max 
Javascript :: average javascript 
Javascript :: access css and js files inside resources folder in laravel 
Javascript :: click 
Javascript :: deploy node app to heroku 
Javascript :: use node modules in next.js 
Javascript :: javascript draw canvas grid 
Javascript :: return the sum of an array 
Javascript :: dispatch store 
Javascript :: javascript symbol 
Javascript :: how to sort string alphabetically in javascript 
Javascript :: jq json 
Javascript :: flatten array 
Javascript :: basic area chart 
Javascript :: react native update helper 
Javascript :: node js http request express 
Javascript :: javascript timer 
Javascript :: how to check if a number is negative in p5.js 
Javascript :: dockument anywhere click fucntion in js 
Javascript :: frame-grab js 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =