Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

react function typescript

export const SingleFaq: React.FC<{ question: string; answer: string }> = ({ question, answer }) => {
  const [open, setOpen] = useState(false);
  return (
    <FlexCol className="w-full md:w-[49%] flex flex-col items-center">
      <div className="question text-secondary">{question}</div>
      <div className="text-white answer">{answer}</div>
    </FlexCol>
  );
};
 
PREVIOUS NEXT
Tagged: #react #function #typescript
ADD COMMENT
Topic
Name
2+5 =