Skip to content

Commit

Permalink
refactor: quiz 화면 preview(#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheonilyeong committed Jan 10, 2025
1 parent 322515e commit 8563c88
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ import androidx.compose.foundation.layout.size
import androidx.compose.foundation.rememberScrollState
import androidx.compose.material3.ElevatedAssistChip
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import kr.boostcamp_2024.course.domain.model.BaseQuiz
import kr.boostcamp_2024.course.domain.model.Category
import kr.boostcamp_2024.course.domain.model.Quiz
import kr.boostcamp_2024.course.domain.model.RealTimeQuiz
import kr.boostcamp_2024.course.quiz.R

Expand Down Expand Up @@ -85,3 +88,33 @@ fun QuizDataChip(
}
}
}

@Preview(showBackground = true, locale = "ko")
@Composable
fun QuizDataChipPreview() {
MaterialTheme {
QuizDataChip(
category = Category(
id = "id",
name = "카테고리 이름",
description = "description",
categoryImageUrl = "categoryImageUrl",
quizzes = emptyList(),
),
quiz = Quiz(
id = "id",
title = "퀴즈 제목",
description = "퀴즈 설명",
startTime = "2024-12-12",
solveTime = 60,
questions = listOf(
"문제1",
"문제2",
"문제3",
),
userOmrs = emptyList(),
quizImageUrl = "quizImageUrl",
),
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -186,25 +186,29 @@ fun QuizScreen(
}
}

@Preview(showBackground = true)
@Preview(showBackground = true, locale = "ko")
@Composable
fun QuizStartScreenPreview() {
WeQuizTheme {
QuizScreen(
category = Category(
id = "id",
name = "name",
name = "카테고리 이름",
description = "description",
categoryImageUrl = "categoryImageUrl",
quizzes = emptyList(),
),
quiz = Quiz(
id = "id",
title = "퀴즈 제목임",
description = "퀴즈 설명임",
startTime = "startTime",
title = "퀴즈 제목",
description = "퀴즈 설명",
startTime = "2024-12-12",
solveTime = 60,
questions = emptyList(),
questions = listOf(
"문제1",
"문제2",
"문제3",
),
userOmrs = emptyList(),
quizImageUrl = "quizImageUrl",
),
Expand Down

0 comments on commit 8563c88

Please sign in to comment.