diff --git a/components/button/Copy.js b/components/button/Copy.js index a50130cff..1da92d903 100644 --- a/components/button/Copy.js +++ b/components/button/Copy.js @@ -30,8 +30,9 @@ const Copy = ({ value, className = '', onCopy }) => { return ( ); diff --git a/components/image/QRCode.js b/components/image/QRCode.js index 8a35acb24..74ab7803f 100644 --- a/components/image/QRCode.js +++ b/components/image/QRCode.js @@ -2,21 +2,28 @@ import React, { useEffect, useRef } from 'react'; import PropTypes from 'prop-types'; import QRCodeJS from 'qrcodejs2'; -const QRCode = ({ url, ...rest }) => { +const QRCode = ({ url: text, width = 128, height = 128, ...rest }) => { const divRef = useRef(null); useEffect(() => { - const qrcode = new QRCodeJS(divRef.current, url); + const qrcode = new QRCodeJS(divRef.current, { + text, + width, + height + }); + return () => { qrcode.clear(); }; - }, []); + }, [width, height]); return
; }; QRCode.propTypes = { - url: PropTypes.string.isRequired + url: PropTypes.string.isRequired, + width: PropTypes.number, + height: PropTypes.number }; export default QRCode; diff --git a/components/link/Info.js b/components/link/Info.js index 36671591f..e60192589 100644 --- a/components/link/Info.js +++ b/components/link/Info.js @@ -11,7 +11,7 @@ const Info = ({ title = undefined, originalPlacement = 'top', scrollContainerClass = 'main', - buttonClass = 'inline-flex', + buttonClass = 'inline-flex color-currentColor', ...rest }) => { const [uid] = useState(generateUID('tooltip')); diff --git a/components/modal/Footer.js b/components/modal/Footer.js index 46d97c3ff..78eed985e 100644 --- a/components/modal/Footer.js +++ b/components/modal/Footer.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { classnames } from '../../helpers/component'; -const Footer = ({ children, className = 'flex flex-spacebetween', ...rest }) => { +const Footer = ({ children, className = 'flex flex-spacebetween flex-items-center flex-nowrap', ...rest }) => { return (