Answers for "how to add material ui button"

1

import button material ui

import Button from '@material-ui/core/Button';
// or
import { Button } from '@material-ui/core';
Posted by: Guest on February-24-2021
1

material-ui button

// Check out my online sandbox to see more button props
// https://codesandbox.io/s/material-ui-button-e809z?file=/src/App.js

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

export default function MaterialuiButton() {
  
  function handleButtonPress() {
    console.log("button pressed");
  }
  
  return (
    <Button
    variant='contained'
    color='primary'
    onClick={() => {
        handleButtonPress();
    }}
    >
      PRESS ME
    </Button>
  );
}
Posted by: Guest on February-19-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language