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}
> >
<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