Skip to content

Commit

Permalink
feat: add quiz component for software testing
Browse files Browse the repository at this point in the history
  • Loading branch information
zyf722 committed Apr 5, 2024
1 parent c2d5715 commit 7c78247
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/components/Quiz/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from "react";
import Heading from "@theme/Heading";

type QuizProp = {
children: React.ReactNode;
question: string;
};

export default function Quiz({ children, question }: QuizProp): JSX.Element {
return (
<React.Fragment>
<Heading as="h3">{question}</Heading>
<div style={{ display: "flex" }}>
<div style={{ fontWeight: "bold" }}>答:</div>
<div>{children}</div>
</div>
</React.Fragment>
);
}

0 comments on commit 7c78247

Please sign in to comment.