{
onChange(vote === "yes" ? "no" : "yes");
}}
className={clsx(
"flex items-center space-x-3 px-4 py-3 transition duration-75",
{
"active:bg-indigo-50": editable,
"bg-indigo-50/50": editable && vote === "yes",
},
)}
>
{children}
{participants.length > 0 ? (
{participants
.slice(0, participants.length <= 6 ? 6 : 5)
.map((participant, i) => {
return (
);
})}
{participants.length > 6 ? (
+{participants.length - 5}
) : null}
) : null}
{editable ? (
) : vote ? (
) : null}
);
};
export default PollOption;