import React, { useState } from "react";
import _ from "lodash";
export default function Question({ question }) {
const [select, setSelect] = useState("");
return (
سوال ۱
{question.text}
{question.options.map((option, index) => (
- setSelect(option)}
className={_.join(
[
"rounded-md w-full overflow-hidden flex items-center my-2 cursor-pointer transition-all duration-500",
],
" "
)}
style={{
backgroundColor: select === option ? "#32af00" : "transparent",
borderColor: select === option ? "transparent" : "#777",
borderWidth: 1,
borderStyle: "solid",
}}
key={index}
>
الف
{option}
))}
);
}