March 2019
Intermediate to advanced
534 pages
14h 52m
English
Let's say that your application needs to be able to alert users when their allotted disk space is running low. Here's an example that shows what the alert might look like:
import React, { Fragment, useState } from 'react';import Button from '@material-ui/core/Button';import DialogContent from '@material-ui/core/DialogContent';import DialogContentText from '@material-ui/core/DialogContentText';import DialogActions from '@material-ui/core/DialogActions';import Dialog from '@material-ui/core/Dialog';export default function ConfirmingActions() { const [open, setOpen] = useState(false); return ( <Fragment> <Button color="primary" onClick={() => setOpen(true)}> Show Alert </Button> <Dialog open={open}> <DialogContent> <DialogContentText> ...Read now
Unlock full access