1
0
Fork 0
freesewing/packages/components/src/Blockquote/index.js

26 lines
525 B
JavaScript
Raw Normal View History

import React from "react";
2019-07-02 19:27:51 +02:00
import PropTypes from "prop-types";
import Icon from "../Icon";
2019-07-02 19:27:51 +02:00
const Blockquote = ({ type, children, style }) => {
return (
2019-07-02 19:27:51 +02:00
<blockquote className={type} style={style}>
{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: {}
};
export default Blockquote;