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

29 lines
597 B
JavaScript
Raw Normal View History

import React from 'react'
import PropTypes from 'prop-types'
import Icon from '../Icon'
const Blockquote = props => {
const attr = Object.assign({}, props)
delete attr.type
delete attr.children
return (
<blockquote className={props.type} {...attr}>
{props.children}
<Icon icon={props.type} className={'icon ' + props.type} />
</blockquote>
)
}
2019-07-02 19:27:51 +02:00
Blockquote.propTypes = {
type: PropTypes.string.isRequired,
children: PropTypes.node,
style: PropTypes.object
}
2019-07-02 19:27:51 +02:00
Blockquote.defaultProps = {
type: 'note',
2019-07-02 19:27:51 +02:00
children: null,
style: {}
}
export default Blockquote