From 112ead9796af1306630d4bd458e0851386098bc4 Mon Sep 17 00:00:00 2001 From: Joost De Cock Date: Sat, 17 Aug 2019 18:18:19 +0200 Subject: [PATCH] :sparkles: Updated Blockquote component to take data-test attributes --- packages/components/src/Blockquote/index.js | 29 ++++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/packages/components/src/Blockquote/index.js b/packages/components/src/Blockquote/index.js index b47bb642131..bf8786af78a 100644 --- a/packages/components/src/Blockquote/index.js +++ b/packages/components/src/Blockquote/index.js @@ -1,25 +1,28 @@ -import React from "react"; -import PropTypes from "prop-types"; -import Icon from "../Icon"; +import React from 'react' +import PropTypes from 'prop-types' +import Icon from '../Icon' -const Blockquote = ({ type, children, style }) => { +const Blockquote = props => { + const attr = Object.assign({}, props) + delete attr.type + delete attr.children return ( -
- {children} - +
+ {props.children} +
- ); -}; + ) +} Blockquote.propTypes = { type: PropTypes.string.isRequired, children: PropTypes.node, style: PropTypes.object -}; +} Blockquote.defaultProps = { - type: "note", + type: 'note', children: null, style: {} -}; -export default Blockquote; +} +export default Blockquote