-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature/PreviewParameterProvider] Preview Parameter Provider 추가 #325
Changes from 6 commits
f02104f
834b6e6
b6532df
8aab31d
abae8fa
66a41ef
f72ed9e
39d64e7
7e2a42a
7cdd4f3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,8 @@ import androidx.compose.ui.graphics.vector.ImageVector | |
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.res.vectorResource | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.tooling.preview.PreviewParameter | ||
import androidx.compose.ui.tooling.preview.PreviewParameterProvider | ||
import androidx.compose.ui.unit.Dp | ||
import androidx.compose.ui.unit.dp | ||
import com.droidknights.app.core.designsystem.theme.KnightsTheme | ||
|
@@ -153,24 +155,19 @@ private fun BookMarkItemForPreview(isEditMode: Boolean) { | |
) | ||
} | ||
|
||
@Preview(showBackground = true, backgroundColor = 0xFFF9F9F9) | ||
@Composable | ||
private fun BookmarkItemPreview() { | ||
KnightsTheme { | ||
Column { | ||
BookMarkItemForPreview(isEditMode = false) | ||
BookMarkItemForPreview(isEditMode = false) | ||
} | ||
} | ||
class IsEditModePreviewParameterProvider : PreviewParameterProvider<Boolean> { | ||
override val values = sequenceOf(true, false) | ||
} | ||
|
||
@Preview(showBackground = true, backgroundColor = 0xFFF9F9F9) | ||
@Composable | ||
private fun BookmarkItemEditModePreview() { | ||
private fun BookmarkItemPreview( | ||
@PreviewParameter(IsEditModePreviewParameterProvider::class) isEditMode: Boolean, | ||
) { | ||
KnightsTheme { | ||
Column { | ||
BookMarkItemForPreview(isEditMode = true) | ||
BookMarkItemForPreview(isEditMode = true) | ||
BookMarkItemForPreview(isEditMode = isEditMode) | ||
BookMarkItemForPreview(isEditMode = isEditMode) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 부분까지 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 넵 알겠습니다! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 추가로 |
||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
모듈 내부에 만 있다보니
internal
키워두 있는것이 좋을것 같네요.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵! 모듈 내부에서 사용하는 모든
PreviewParameterProvider
에internal
키워드 추가했습니다 :)