diff --git a/src/components/style/Style.js b/src/components/style/Style.js index 83b705e..7369d07 100644 --- a/src/components/style/Style.js +++ b/src/components/style/Style.js @@ -1,4 +1,4 @@ -import React from 'react' +import React from "react"; import PropTypes from 'prop-types' function calClassName(selected) { @@ -6,9 +6,9 @@ function calClassName(selected) { return 'Qr-item'; } -const Style = ({ value, renderer, selected, onClick }) => ( +const Style = ({ value, renderer, selected, onSelected }) => (
+ onMouseDown={onSelected}>
{renderer} @@ -24,7 +24,7 @@ Style.propTypes = { value: PropTypes.string.isRequired, renderer: PropTypes.object.isRequired, selected: PropTypes.bool.isRequired, - onClick: PropTypes.func.isRequired + onSelected: PropTypes.func.isRequired } export default Style; diff --git a/src/components/style/StyleList.js b/src/components/style/StyleList.js index de01b64..4a9f57f 100644 --- a/src/components/style/StyleList.js +++ b/src/components/style/StyleList.js @@ -8,7 +8,7 @@ const StyleList = ({ styles, onSelected }) => (