Remove unused Breadcrumb component [MAILPOET-2433]

This commit is contained in:
wxa
2020-11-09 14:53:46 +03:00
committed by Veljko V
parent 9359143346
commit c4be6da26f
4 changed files with 0 additions and 98 deletions

View File

@@ -14,18 +14,6 @@
font-size: 23px;
}
.mailpoet_breadcrumbs {
float: left;
font-size: .9em;
margin-bottom: 13px;
margin-left: 17px;
text-transform: uppercase;
p {
margin: 0;
}
}
#mailpoet_heading_email_type {
width: 200px;
}

View File

@@ -1,18 +0,0 @@
.mailpoet_breadcrumb {
color: $color-text;
font-size: .9em;
text-transform: uppercase;
}
.mailpoet_breadcrumb .mailpoet_current {
font-weight: bold;
}
.mailpoet_breadcrumb a {
color: $color-text;
text-decoration: none;
}
.mailpoet_breadcrumb a:hover {
color: $color-text-hover;
}

View File

@@ -63,7 +63,6 @@
@import 'components-plugin/listing';
@import 'components-plugin/listing-forms';
@import 'components-plugin/listing-newsletters';
@import 'components-plugin/breadcrumb';
@import 'components-plugin/forms';
@import 'components-plugin/settings';
@import 'components-plugin/progress-bar';

View File

@@ -1,67 +0,0 @@
import React from 'react';
import classNames from 'classnames';
import PropTypes from 'prop-types';
import MailPoet from 'mailpoet';
class Breadcrumb extends React.Component {
constructor(props) {
super(props);
const steps = props.steps || [
{
name: 'type',
label: MailPoet.I18n.t('selectType'),
},
{
name: 'template',
label: MailPoet.I18n.t('template'),
},
{
name: 'editor',
label: MailPoet.I18n.t('designer'),
},
{
name: 'send',
label: MailPoet.I18n.t('send'),
},
];
this.state = {
steps,
};
}
render() {
const steps = this.state.steps.map((step, index) => {
const stepClasses = classNames(
{ mailpoet_current: (this.props.step === step.name) }
);
return (
<span key={`step-${step.label}`}>
<span className={stepClasses}>
{ step.label }
</span>
{ (index < (this.state.steps.length - 1)) ? ' > ' : '' }
</span>
);
});
return (
<p className="mailpoet_breadcrumb">
{ steps }
</p>
);
}
}
Breadcrumb.propTypes = {
steps: PropTypes.arrayOf(PropTypes.object),
step: PropTypes.string,
};
Breadcrumb.defaultProps = {
steps: undefined,
step: null,
};
export default Breadcrumb;