-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d5a4b17
commit d7174d7
Showing
21 changed files
with
338 additions
and
353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/* eslint-disable jsx-a11y/anchor-is-valid */ | ||
|
||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { withStyles } from '@material-ui/core/styles'; | ||
import Paper from '@material-ui/core/Paper'; | ||
import Breadcrumbs from '@material-ui/lab/Breadcrumbs'; | ||
import Breadcrumb from '@material-ui/lab/Breadcrumb'; | ||
import Link from '@material-ui/core/Link'; | ||
import NavigateNextIcon from '@material-ui/icons/NavigateNext'; | ||
|
||
const styles = theme => ({ | ||
root: { | ||
justifyContent: 'center', | ||
flexWrap: 'wrap', | ||
}, | ||
paper: { | ||
padding: `${theme.spacing.unit}px ${theme.spacing.unit * 2}px`, | ||
}, | ||
}); | ||
|
||
function handleClick() { | ||
alert('You clicked a Breadcrumb.'); // eslint-disable-line no-alert | ||
} | ||
|
||
function CustomSeparator(props) { | ||
const { classes } = props; | ||
|
||
return ( | ||
<div className={classes.root}> | ||
<Paper className={classes.paper}> | ||
<Breadcrumbs separator="›" arial-label="Breadcrumb navigation"> | ||
<Breadcrumb> | ||
<Link color="inherit" href="#" onClick={handleClick}> | ||
Material-UI | ||
</Link> | ||
</Breadcrumb> | ||
<Breadcrumb> | ||
<Link color="inherit" href="#" onClick={handleClick}> | ||
Lab | ||
</Link> | ||
</Breadcrumb> | ||
<Breadcrumb color="textPrimary">Breadcrumb</Breadcrumb> | ||
</Breadcrumbs> | ||
</Paper> | ||
<br /> | ||
<Paper className={classes.paper}> | ||
<Breadcrumbs separator="-" arial-label="Breadcrumb navigation"> | ||
<Breadcrumb> | ||
<Link color="inherit" href="#" onClick={handleClick}> | ||
Material-UI | ||
</Link> | ||
</Breadcrumb> | ||
<Breadcrumb> | ||
<Link color="inherit" href="#" onClick={handleClick}> | ||
Lab | ||
</Link> | ||
</Breadcrumb> | ||
<Breadcrumb color="textPrimary">Breadcrumb</Breadcrumb> | ||
</Breadcrumbs> | ||
</Paper> | ||
<br /> | ||
<Paper className={classes.paper}> | ||
<Breadcrumbs separator={<NavigateNextIcon />} arial-label="Breadcrumb navigation"> | ||
<Breadcrumb> | ||
<Link color="inherit" href="#" onClick={handleClick}> | ||
Material-UI | ||
</Link> | ||
</Breadcrumb> | ||
<Breadcrumb> | ||
<Link color="inherit" href="#" onClick={handleClick}> | ||
Lab | ||
</Link> | ||
</Breadcrumb> | ||
<Breadcrumb color="textPrimary">Breadcrumb</Breadcrumb> | ||
</Breadcrumbs> | ||
</Paper> | ||
</div> | ||
); | ||
} | ||
|
||
CustomSeparator.propTypes = { | ||
classes: PropTypes.object.isRequired, | ||
}; | ||
|
||
export default withStyles(styles)(CustomSeparator); |
36 changes: 0 additions & 36 deletions
36
docs/src/pages/lab/breadcrumbs/CustomSeparatorComponent.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.