Skip to content

Commit

Permalink
Merge pull request #123 from uswLectureEvaluation/refactor/#122-resource
Browse files Browse the repository at this point in the history
Refactor/#122 컴포넌트, 리소스 분리
  • Loading branch information
jinukeu authored Jan 28, 2024
2 parents 4d58a84 + 7c1b9aa commit 3eca90b
Show file tree
Hide file tree
Showing 52 changed files with 364 additions and 539 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
package com.suwiki.core.designsystem.component.bottomsheet

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.material3.rememberModalBottomSheetState
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import com.suwiki.core.designsystem.component.align.SuwikiSelectContainer
import com.suwiki.core.designsystem.R
import com.suwiki.core.designsystem.theme.Gray6A
import com.suwiki.core.designsystem.theme.Gray95
import com.suwiki.core.designsystem.theme.Primary
import com.suwiki.core.designsystem.theme.SuwikiTheme
import com.suwiki.core.designsystem.theme.White
import com.suwiki.core.ui.extension.suwikiClickable
import kotlinx.collections.immutable.PersistentList

@OptIn(ExperimentalMaterial3Api::class)
Expand Down Expand Up @@ -39,6 +51,46 @@ fun SuwikiSelectBottomSheet(
}
}

@Composable
private fun SuwikiSelectContainer(
modifier: Modifier = Modifier,
text: String,
isChecked: Boolean = false,
onClick: () -> Unit = {},
) {
val textColor = if (isChecked) Primary else Gray6A
Box(
modifier = modifier
.background(White)
.fillMaxWidth()
.wrapContentHeight()
.suwikiClickable(
onClick = onClick,
rippleColor = Gray6A,
),
) {
Text(
text = text,
color = textColor,
style = SuwikiTheme.typography.body2,
modifier = Modifier
.align(Alignment.CenterStart)
.padding(top = 13.dp, bottom = 14.dp, start = 24.dp, end = 52.dp),
)
if (isChecked) {
Icon(
painter = painterResource(id = R.drawable.ic_align_checked),
contentDescription = "",
modifier = Modifier
.align(Alignment.CenterEnd)
.padding(end = 16.dp)
.size(24.dp),
tint = Primary,
)
}
}
}

@Composable
fun SuwikiSelectBottomSheetContent(
selectedPosition: Int?,
Expand Down
Loading

0 comments on commit 3eca90b

Please sign in to comment.