From faf4cba37c8dd123600a62ec4feb39cccd851bcb Mon Sep 17 00:00:00 2001 From: Haishan Date: Thu, 14 May 2020 22:50:48 +0800 Subject: chore: lib classnames -> clsx --- src/components/Selection.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/components/Selection.js') diff --git a/src/components/Selection.js b/src/components/Selection.js index 12816f9..725d500 100644 --- a/src/components/Selection.js +++ b/src/components/Selection.js @@ -1,6 +1,6 @@ import React from 'react'; import { func, array, number } from 'prop-types'; -import cx from 'classnames'; +import cx from 'clsx'; import s from './Selection.module.css'; @@ -8,7 +8,7 @@ export default function Selection({ OptionComponent, optionPropsList, selectedIndex, - onChange + onChange, }) { return ( // TODO a11y @@ -20,7 +20,7 @@ export default function Selection({
{ + onClick={(ev) => { ev.preventDefault(); if (idx !== selectedIndex) { onChange(idx); @@ -39,7 +39,7 @@ Selection.propTypes = { OptionComponent: func, optionPropsList: array, selectedIndex: number, - onChange: func + onChange: func, }; // for test @@ -51,7 +51,7 @@ export function Option({ title }) { style={{ width: 100, height: 60, - backgroundColor: '#eee' + backgroundColor: '#eee', }} > {title} -- cgit v1.3.1