2019-05-18 17:19:47 +02:00
|
|
|
import React from "react";
|
2019-07-02 19:27:51 +02:00
|
|
|
import PropTypes from "prop-types";
|
2019-05-18 17:19:47 +02:00
|
|
|
import Icon from "../Icon";
|
|
|
|
|
2019-07-02 19:27:51 +02:00
|
|
|
const Blockquote = ({ type, children, style }) => {
|
2019-05-18 17:19:47 +02:00
|
|
|
return (
|
2019-07-02 19:27:51 +02:00
|
|
|
<blockquote className={type} style={style}>
|
2019-05-18 17:19:47 +02:00
|
|
|
{children}
|
|
|
|
<Icon icon={type} className={"icon " + type} />
|
|
|
|
</blockquote>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2019-07-02 19:27:51 +02:00
|
|
|
Blockquote.propTypes = {
|
|
|
|
type: PropTypes.string.isRequired,
|
|
|
|
children: PropTypes.node,
|
|
|
|
style: PropTypes.object
|
|
|
|
};
|
|
|
|
|
|
|
|
Blockquote.defaultProps = {
|
|
|
|
type: "note",
|
|
|
|
children: null,
|
|
|
|
style: {}
|
|
|
|
};
|
2019-05-18 17:19:47 +02:00
|
|
|
export default Blockquote;
|