Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Breadcrumbs] Remove private separator component #19234

Merged
merged 1 commit into from
Jan 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions packages/material-ui/src/Breadcrumbs/BreadcrumbSeparator.js

This file was deleted.

26 changes: 0 additions & 26 deletions packages/material-ui/src/Breadcrumbs/BreadcrumbSeparator.test.js

This file was deleted.

12 changes: 8 additions & 4 deletions packages/material-ui/src/Breadcrumbs/Breadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import clsx from 'clsx';
import withStyles from '../styles/withStyles';
import Typography from '../Typography';
import BreadcrumbCollapsed from './BreadcrumbCollapsed';
import BreadcrumbSeparator from './BreadcrumbSeparator';

export const styles = {
/* Styles applied to the root element. */
Expand All @@ -23,17 +22,22 @@ export const styles = {
listStyle: 'none',
},
/* Styles applied to the separator element. */
separator: {},
separator: {
display: 'flex',
userSelect: 'none',
marginLeft: 8,
marginRight: 8,
},
};

function insertSeparators(items, className, separator) {
return items.reduce((acc, current, index) => {
if (index < items.length - 1) {
acc = acc.concat(
current,
<BreadcrumbSeparator key={`separator-${index}`} className={className}>
<li aria-hidden key={`separator-${index}`} className={className}>
{separator}
</BreadcrumbSeparator>,
</li>,
);
} else {
acc.push(current);
Expand Down