summaryrefslogtreecommitdiff
path: root/src/components/Selection.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Selection.js')
-rw-r--r--src/components/Selection.js10
1 files changed, 5 insertions, 5 deletions
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({
<div
key={idx}
className={className}
- onClick={ev => {
+ 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}