Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

mui switch colours

const theme = createMuiTheme({
    overrides: {
      MuiSwitch: {
        switchBase: {
          // Controls default (unchecked) color for the thumb
          color: "#ccc",
          "&$checked": {
            // Controls checked color for the thumb
            color: "#f2ff00"
          }
        },
        track: {
          // Controls default (unchecked) color for the track
          opacity: 0.2,
          backgroundColor: "#fff",
          "$checked$checked + &": {
            // Controls checked color for the track
            opacity: 0.7,
            backgroundColor: "#fff"
          }
        }
      }
    }
  });

<Switch
	classes={{
         switchBase:
         switchClasses.switchBase,
         thumb: switchClasses.thumb,
         track: switchClasses.track,
         checked: switchClasses.checked,
        }}
Comment

PREVIOUS NEXT
Code Example
Javascript :: youtube video regex 
Javascript :: cypress get selected dropdown value 
Javascript :: input in javascript 
Javascript :: js find longest word in string function 
Javascript :: how to handle all error of all router in express 
Javascript :: js escape html 
Javascript :: how to catch and throw error js 
Javascript :: javascript how to check if element is visible on screen 
Javascript :: a function that calls itself js 
Javascript :: regex not contain 
Javascript :: split sentence in array js 
Javascript :: javascript search dictionary by value 
Javascript :: get year from date javascript 
Javascript :: js throw custom error 
Javascript :: jquery focus 
Javascript :: moment js - to find if dates are same by day 
Javascript :: como ler um arquivo json com javascript 
Javascript :: js add to array conditionally 
Javascript :: loop array in javascript 
Javascript :: javascript pass object by value 
Javascript :: axios x-api-key for all 
Javascript :: jquery find children not working 
Javascript :: create react portal 
Javascript :: how to change style of an element using javascript 
Javascript :: slickcdn 
Javascript :: toggle class javascript stack overflow 
Javascript :: convert node.js to ES6 
Javascript :: lodash remove element from array 
Javascript :: access variable outside for loop javascript 
Javascript :: js string does not contain 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =