Grégoire Delattre bcadc48d5a Launch prettier with the --fix option
They've changed their default settings, this changes a lot of stuff in
our code base.
2020-04-01 17:55:34 +02:00

26 lines
513 B
JavaScript

import React from "react";
import PropTypes from "prop-types";
import { WishlistButton } from "../buttons/wishlist";
export const Title = ({ title, wishlist, wishlisted }) => {
if (title === "") {
return null;
}
return (
<span className="title">
<WishlistButton wishlist={wishlist} wishlisted={wishlisted} />
{title}
</span>
);
};
Title.propTypes = {
title: PropTypes.string,
wishlist: PropTypes.func,
wishlisted: PropTypes.bool,
};
Title.defaultProps = {
title: "",
};