components#PageTitle JavaScript Examples
The following examples show how to use
components#PageTitle.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Tables.js From paper-and-ink with MIT License | 6 votes |
export default function Tables() {
const classes = useStyles();
return (
<div className={classes.root}>
<Grid container spacing={4}>
<Grid item xs={12}>
<PageTitle title="Tables" />
</Grid>
<Grid item xs={12}>
<Widget title="Simple Table">
<SimpleTable />
</Widget>
</Grid>
<Grid item xs={12}>
<Widget title="Enhanced Table">
<EnhancedTable />
</Widget>
</Grid>
</Grid>
</div>
);
}
Example #2
Source File: Typography.js From paper-and-ink with MIT License | 6 votes |
Typography = () => {
const classes = useStyles();
return (
<div className={classes.root}>
<Grid container spacing={4}>
<Grid item xs={12}>
<PageTitle title="Typography" />
</Grid>
<Grid item xs={12}>
<Paper className={classes.paper}>
<Grid item container spacing={2} xs={12}>
{Object.keys(variants).map((key, index) => (
<Grid key={index} item sm={9} xs={12}>
<MuiTypography variant={key}>{variants[key]}</MuiTypography>
</Grid>
))}
</Grid>
</Paper>
</Grid>
</Grid>
</div>
);
}
Example #3
Source File: Icons.js From paper-and-ink with MIT License | 5 votes |
export default function SearchIcons() {
const classes = useStyles();
const [open, setOpen] = React.useState(false);
const [selectedIcon, setSelectedIcon] = React.useState(null);
const [showMore, setShowMore] = React.useState(false);
const handleClickOpen = React.useCallback(event => {
setSelectedIcon(allIconsMap[event.currentTarget.getAttribute('title')]);
setOpen(true);
}, []);
const handleClose = React.useCallback(() => {
setOpen(false);
}, []);
const isMounted = React.useRef(false);
React.useEffect(() => {
isMounted.current = true;
return () => {
isMounted.current = false;
};
}, []);
const onShowMore = () => setShowMore(true);
const filteredIcons = !showMore ? allIcons.slice(0, 100) : allIcons;
return (
<div className={classes.root}>
<PageTitle title="Icons" />
<Paper className={classes.paper} elevation={0}>
<Icons icons={filteredIcons} classes={classes} handleClickOpen={handleClickOpen} />
{!showMore && (
<Box width={1} textAlign="center">
<Button className={classes.showAll} onClick={onShowMore} color="primary">
Show All Icons
</Button>
</Box>
)}
</Paper>
<DialogDetails open={open} selectedIcon={selectedIcon} handleClose={handleClose} />
</div>
);
}