apply eslint and prettier rules

This commit is contained in:
Sebastian Sdorra
2019-10-21 10:57:56 +02:00
parent 85773186db
commit 4bb8e6153b
227 changed files with 1147 additions and 4076 deletions

View File

@@ -37,11 +37,7 @@ class ConfirmAlert extends React.Component<Props> {
<div className="field is-grouped">
{buttons.map((button, i) => (
<p className="control">
<a
className="button is-info"
key={i}
onClick={() => this.handleClickButton(button)}
>
<a className="button is-info" key={i} onClick={() => this.handleClickButton(button)}>
{button.label}
</a>
</p>
@@ -49,15 +45,7 @@ class ConfirmAlert extends React.Component<Props> {
</div>
);
return (
<Modal
title={title}
closeFunction={() => this.close()}
body={body}
active={true}
footer={footer}
/>
);
return <Modal title={title} closeFunction={() => this.close()} body={body} active={true} footer={footer} />;
}
}

View File

@@ -17,15 +17,7 @@ class Modal extends React.Component<Props> {
};
render() {
const {
title,
closeFunction,
body,
footer,
active,
className,
headColor
} = this.props;
const { title, closeFunction, body, footer, active, className, headColor } = this.props;
const isActive = active ? "is-active" : null;
@@ -38,18 +30,9 @@ class Modal extends React.Component<Props> {
<div className={classNames("modal", className, isActive)}>
<div className="modal-background" />
<div className="modal-card">
<header
className={classNames(
"modal-card-head",
`has-background-${headColor}`
)}
>
<header className={classNames("modal-card-head", `has-background-${headColor}`)}>
<p className="modal-card-title is-marginless">{title}</p>
<button
className="delete"
aria-label="close"
onClick={closeFunction}
/>
<button className="delete" aria-label="close" onClick={closeFunction} />
</header>
<section className="modal-card-body">{body}</section>
{showFooter}