update src/components/Radio/index.js and src/views/Address/index.js

temp
mahdi 2 years ago
parent 7cc6f3240f
commit 0534e5ddae
  1. 2
      src/components/Radio/index.js
  2. 11
      src/views/Address/index.js

@ -9,7 +9,7 @@ export default function Radio(props) {
name={props.name} name={props.name}
type="radio" type="radio"
className="accent-pink-500" className="accent-pink-500"
checked={props.active} // checked={props.active}
onChange={() => {}} onChange={() => {}}
/> />
<label htmlFor="radio-1" className="radio-label text-xs"> <label htmlFor="radio-1" className="radio-label text-xs">

@ -349,11 +349,14 @@ export const Address = ({
}`} }`}
> >
<div <div
className="flex flex-row items-center mb-7" className={`flex flex-row items-center mb-7 cursor-pointer ${
onClick={() => setActiveCheckbox(true)} activeCheckbox ? "bg-red-400" : "bg-blue-400"
}`}
onClick={() => {
setActiveCheckbox(!activeCheckbox);
}}
> >
<Radio /> <span className="font-bold">{activeCheckbox ? "mahdi" : "iran"}</span>
<span className="font-bold">برای خودم</span>
</div> </div>
{ {

Loading…
Cancel
Save