-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7b4a4c9
commit b61451c
Showing
18 changed files
with
450 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
core/designsystem/src/main/java/com/withpeace/withpeace/core/designsystem/ui/Checkbox.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package com.withpeace.withpeace.core.designsystem.ui | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.material3.Checkbox | ||
import androidx.compose.material3.CheckboxDefaults | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import com.withpeace.withpeace.core.designsystem.theme.WithpeaceTheme | ||
|
||
@Composable | ||
fun CheonghaCheckbox( | ||
modifier: Modifier = Modifier, | ||
checked: Boolean, | ||
onCheckedChanged: (Boolean) -> Unit, | ||
) { | ||
Checkbox( | ||
modifier = modifier, | ||
colors = CheckboxDefaults.colors( | ||
checkedColor = WithpeaceTheme.colors.MainPurple, | ||
uncheckedColor = WithpeaceTheme.colors.SystemGray2, | ||
checkmarkColor = WithpeaceTheme.colors.SystemWhite, | ||
), | ||
checked = checked, | ||
onCheckedChange = onCheckedChanged, | ||
) | ||
} | ||
|
||
@Composable | ||
fun TransparentCheonghaCheckbox( | ||
modifier: Modifier = Modifier, | ||
checked: Boolean, | ||
onCheckedChanged: (Boolean) -> Unit, | ||
) { | ||
Checkbox( | ||
modifier = modifier, | ||
colors = CheckboxDefaults.colors( | ||
checkedColor = Color.Transparent, | ||
uncheckedColor = Color.Transparent, | ||
).copy( | ||
uncheckedCheckmarkColor = WithpeaceTheme.colors.SystemGray2, | ||
checkedCheckmarkColor = WithpeaceTheme.colors.MainPurple, | ||
uncheckedBoxColor = Color.Unspecified, | ||
), | ||
checked = checked, | ||
onCheckedChange = onCheckedChanged, | ||
) | ||
} | ||
|
||
@Composable | ||
@Preview | ||
fun TransparentCheonghaCheckboxPreview() { | ||
WithpeaceTheme { | ||
TransparentCheonghaCheckbox( | ||
modifier = Modifier.background(color = WithpeaceTheme.colors.SystemWhite), | ||
checked = false, | ||
onCheckedChanged = {}, | ||
) | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.