Answers for "material ui change button to custom color"

1

material ui change button to custom color

/* 
style={{backgroundColor: '#12824C', color: '#FFFFFF'}}
backgroundColor changes the button color 
color changes the text color
These examples use Hex to define the color (Green button with white text)
*/

// Example
import React from 'react';
import Button from '@material-ui/core/Button';

const GreenButton = () => {
  return(
    <Button 
    style={{backgroundColor: '#12824C', color: '#FFFFFF'}}
    >Green</Button>
  )
}

export default GreenButton;
Posted by: Guest on January-05-2021

Code answers related to "material ui change button to custom color"

Code answers related to "Javascript"

Browse Popular Code Answers by Language