Skip to content

Commit af1b9af

Browse files
authored
Merge pull request #146 from ut-code/keyboard
make hint section (keyboard)
2 parents ce75f31 + fb48802 commit af1b9af

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

  • learn/src/pages/keyboard/tutorial/tutorial1

learn/src/pages/keyboard/tutorial/tutorial1/index.tsx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import RefreshIcon from "@mui/icons-material/Refresh";
1717
interface Question {
1818
question: string;
1919
answer?: string;
20+
hint?: string;
2021
}
2122
type QuestionList = Question[];
2223
export const questionList1: QuestionList = [
@@ -25,7 +26,11 @@ export const questionList1: QuestionList = [
2526
{ question: "じ" },
2627
];
2728
export const questionList2: QuestionList = [
28-
{ question: "弟は 算数を 習う", answer: "おとーとわ さんすーを ならう" },
29+
{
30+
question: "弟は 算数を 習う",
31+
answer: "おとーとわ さんすーを ならう",
32+
hint: "「弟は」は「オトートワ」と入力します。また、「算数」は「サンスー」と入力します。",
33+
},
2934
];
3035
export const questionList3: QuestionList = [
3136
{ question: "2023" },
@@ -129,6 +134,20 @@ export default function Tutorial1({
129134
</Box>
130135
</Paper>
131136

137+
{questionList !== undefined &&
138+
questionList[questionIndex] !== undefined &&
139+
questionList[questionIndex].hint !== undefined && (
140+
<Paper elevation={2} sx={{ my: 2 }}>
141+
<Typography variant="h6" component="h2" color="inherit" p={2}>
142+
ヒント
143+
</Typography>
144+
<Divider />
145+
<Typography sx={{ minHeight: 100 }} p={2}>
146+
{questionList[questionIndex].hint}
147+
</Typography>
148+
</Paper>
149+
)}
150+
132151
<Button
133152
onClick={() => {
134153
if (questionList !== undefined) {

0 commit comments

Comments
 (0)