1
Fork 0

Small refactor

This commit is contained in:
Hadeed 2024-06-01 11:31:43 +04:00
parent faace386e3
commit fee10f6006

View file

@ -22,26 +22,22 @@ export default () => {
onValueChange={setPlayerSymbol} onValueChange={setPlayerSymbol}
loop={false} loop={false}
> >
{[
["cross", Cross],
["oval", Oval],
].map(([value, Symbol]) => (
<RadioGroup.Item <RadioGroup.Item
className="h-full w-1/2 rounded-xl hover:bg-silver-700/5 data-[state='checked']:bg-silver-700" className="group h-full w-1/2 rounded-xl hover:bg-silver-700/5 data-[state='checked']:bg-silver-700"
value="cross" key={value}
value={value}
> >
<Cross <Symbol
width="32" width="32"
height="32" height="32"
className={`m-auto ${playerSymbol == "cross" ? "text-navy-700" : "text-silver-700"}`} className="m-auto text-silver-700 group-data-[state='checked']:text-navy-700"
/>
</RadioGroup.Item>
<RadioGroup.Item
className="h-full w-1/2 rounded-xl hover:bg-silver-700/5 data-[state='checked']:bg-silver-700"
value="oval"
>
<Oval
width="32"
height="32"
className={`m-auto ${playerSymbol == "oval" ? "text-navy-700" : "text-silver-700"}`}
/> />
</RadioGroup.Item> </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