1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-22 14:57:40 +01:00
smov/src/components/NumberSelector.js

21 lines
656 B
JavaScript
Raw Normal View History

2021-07-15 00:09:42 +02:00
import React from 'react';
// import { Arrow } from './Arrow';
import './NumberSelector.css'
// setType: (txt: string) => void
// choices: { label: string, value: string }[]
// selected: string
export function NumberSelector({ setType, choices, selected }) {
return (
<div className="numberSelector">
{choices.map(v=>(
<div key={v.value} className="choiceWrapper">
<div className={`choice ${selected&&selected===v.value?'selected':''}`} onClick={() => setType(v.value)}>
{v.label}
</div>
</div>
))}
</div>
)
}