Almost done
This commit is contained in:
22
src/lib/SimpleQuestionComponent.svelte
Normal file
22
src/lib/SimpleQuestionComponent.svelte
Normal file
@@ -0,0 +1,22 @@
|
||||
<script lang="ts">
|
||||
import type { SimpleQuestion } from "./games/games";
|
||||
|
||||
interface Props {
|
||||
question: SimpleQuestion;
|
||||
showAnswer: boolean;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
let { question, showAnswer }: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class="mb-4 flex grow flex-col items-center text-6xl">
|
||||
<div class="flex grow-1 items-center">
|
||||
<div>{question.data.question}</div>
|
||||
</div>
|
||||
{#if showAnswer}
|
||||
<div class="flex grow-1 items-center">
|
||||
{question.data.answer}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
Reference in New Issue
Block a user