You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
574 B
28 lines
574 B
import React from "react"; |
|
|
|
import "./index.scss"; |
|
|
|
export default function GenderSwitch({ |
|
onChange, |
|
name, |
|
options, |
|
selectedOption, |
|
label, |
|
}) { |
|
return ( |
|
<div className="gender d-flex justify-content-between align-items-center"> |
|
<div |
|
className={selectedOption === 2 && "gender__active"} |
|
onClick={() => onChange(name, 2)} |
|
> |
|
{options[0]} |
|
</div> |
|
<div |
|
className={selectedOption === 1 && "gender__active"} |
|
onClick={() => onChange(name, 1)} |
|
> |
|
{options[1]} |
|
</div> |
|
</div> |
|
); |
|
}
|
|
|