Skip to content

Commit

Permalink
refactor: 컴포넌트에 PreviewKoLightDarkBackground 어노테이션 적용 (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
pengcon committed Jan 18, 2025
1 parent 3f22a0e commit 3a7ffe2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package kr.boostcamp_2024.course.quiz.component

import android.content.res.Configuration.UI_MODE_NIGHT_YES
import android.content.res.Configuration.UI_MODE_TYPE_NORMAL
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.defaultMinSize
Expand All @@ -15,8 +13,8 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import kr.boostcamp_2024.course.designsystem.ui.annotation.PreviewKoLightDarkBackground

@OptIn(ExperimentalMaterial3Api::class)
@Composable
Expand Down Expand Up @@ -50,8 +48,7 @@ internal fun QuizSolveTimeSlider(
)
}

@Preview(showBackground = true, locale = "ko")
@Preview(uiMode = UI_MODE_NIGHT_YES or UI_MODE_TYPE_NORMAL, locale = "ko")
@PreviewKoLightDarkBackground
@Composable
private fun QuizSolveTimeSliderPreview() {
QuizSolveTimeSlider(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package kr.boostcamp_2024.course.quiz.component

import android.content.res.Configuration.UI_MODE_NIGHT_YES
import android.content.res.Configuration.UI_MODE_TYPE_NORMAL
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.background
import androidx.compose.material.icons.Icons
Expand All @@ -25,7 +23,7 @@ import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import kr.boostcamp_2024.course.designsystem.ui.annotation.PreviewKoLightDarkBackground
import kr.boostcamp_2024.course.designsystem.ui.theme.component.WeQuizBaseDialog
import kr.boostcamp_2024.course.domain.model.BaseQuiz
import kr.boostcamp_2024.course.domain.model.Category
Expand Down Expand Up @@ -132,8 +130,7 @@ internal fun QuizTopAppBar(
}


@Preview(showBackground = true, locale = "ko")
@Preview(uiMode = UI_MODE_NIGHT_YES or UI_MODE_TYPE_NORMAL, locale = "ko")
@PreviewKoLightDarkBackground
@Composable
private fun QuizTopAppBarPreview() {
QuizTopAppBar(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import kr.boostcamp_2024.course.designsystem.ui.annotation.PreviewKoLightDarkBackground

@Composable
internal fun RadioTextButton(
Expand Down Expand Up @@ -44,7 +44,7 @@ internal fun RadioTextButton(



@Preview(showBackground = true, locale = "ko")
@PreviewKoLightDarkBackground
@Composable
private fun RadioTextButtonPreview() {
RadioTextButton(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package kr.boostcamp_2024.course.quiz.component

import android.content.res.Configuration.UI_MODE_NIGHT_YES
import android.content.res.Configuration.UI_MODE_TYPE_NORMAL
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
Expand All @@ -13,8 +11,8 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import kr.boostcamp_2024.course.designsystem.ui.annotation.PreviewKoLightDarkBackground

@Composable
internal fun RealTimeQuestion(
Expand Down Expand Up @@ -53,8 +51,7 @@ internal fun RealTimeQuestion(
}
}

@Preview(showBackground = true, locale = "ko")
@Preview(uiMode = UI_MODE_NIGHT_YES or UI_MODE_TYPE_NORMAL, locale = "ko")
@PreviewKoLightDarkBackground
@Composable
private fun RealTimeQuestionPreview() {
RealTimeQuestion(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package kr.boostcamp_2024.course.quiz.component

import android.content.res.Configuration.UI_MODE_NIGHT_YES
import android.content.res.Configuration.UI_MODE_TYPE_NORMAL
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
Expand All @@ -13,8 +11,8 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import kr.boostcamp_2024.course.designsystem.ui.annotation.PreviewKoLightDarkBackground
import kr.boostcamp_2024.course.designsystem.ui.theme.component.WeQuizLocalRoundedImage
import kr.boostcamp_2024.course.designsystem.ui.theme.component.WeQuizRightChatBubble
import kr.boostcamp_2024.course.quiz.R
Expand Down Expand Up @@ -56,8 +54,7 @@ internal fun RealTimeQuizGuideContent(
}
}

@Preview(showBackground = true, locale = "ko")
@Preview(uiMode = UI_MODE_NIGHT_YES or UI_MODE_TYPE_NORMAL, locale = "ko")
@PreviewKoLightDarkBackground
@Composable
private fun RealTimeQuizGuideContentPreview() {
RealTimeQuizGuideContent(
Expand Down

0 comments on commit 3a7ffe2

Please sign in to comment.