Skip to content

Commit

Permalink
[feat]:Remove private separator component
Browse files Browse the repository at this point in the history
Resolves #18676
  • Loading branch information
hiteshkundal committed Jan 14, 2020
1 parent c5e1ae6 commit f068635
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 60 deletions.
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

0 comments on commit f068635

Please sign in to comment.