Small refactor
This commit is contained in:
parent
faace386e3
commit
fee10f6006
1 changed files with 16 additions and 20 deletions
|
@ -22,26 +22,22 @@ export default () => {
|
||||||
onValueChange={setPlayerSymbol}
|
onValueChange={setPlayerSymbol}
|
||||||
loop={false}
|
loop={false}
|
||||||
>
|
>
|
||||||
<RadioGroup.Item
|
{[
|
||||||
className="h-full w-1/2 rounded-xl hover:bg-silver-700/5 data-[state='checked']:bg-silver-700"
|
["cross", Cross],
|
||||||
value="cross"
|
["oval", Oval],
|
||||||
>
|
].map(([value, Symbol]) => (
|
||||||
<Cross
|
<RadioGroup.Item
|
||||||
width="32"
|
className="group h-full w-1/2 rounded-xl hover:bg-silver-700/5 data-[state='checked']:bg-silver-700"
|
||||||
height="32"
|
key={value}
|
||||||
className={`m-auto ${playerSymbol == "cross" ? "text-navy-700" : "text-silver-700"}`}
|
value={value}
|
||||||
/>
|
>
|
||||||
</RadioGroup.Item>
|
<Symbol
|
||||||
<RadioGroup.Item
|
width="32"
|
||||||
className="h-full w-1/2 rounded-xl hover:bg-silver-700/5 data-[state='checked']:bg-silver-700"
|
height="32"
|
||||||
value="oval"
|
className="m-auto text-silver-700 group-data-[state='checked']:text-navy-700"
|
||||||
>
|
/>
|
||||||
<Oval
|
</RadioGroup.Item>
|
||||||
width="32"
|
))}
|
||||||
height="32"
|
|
||||||
className={`m-auto ${playerSymbol == "oval" ? "text-navy-700" : "text-silver-700"}`}
|
|
||||||
/>
|
|
||||||
</RadioGroup.Item>
|
|
||||||
</RadioGroup.Root>
|
</RadioGroup.Root>
|
||||||
<p className="text-base uppercase text-silver-700">
|
<p className="text-base uppercase text-silver-700">
|
||||||
Remember : X goes first
|
Remember : X goes first
|
||||||
|
|
Reference in a new issue