Skip to content

Commit

Permalink
Merge pull request #18 from RandomJusicool/feature/17_fix_JDSColor
Browse files Browse the repository at this point in the history
Feature/17 fix jds color
  • Loading branch information
oheunchan07 authored Jun 16, 2024
2 parents 9fa3029 + 75d8e9b commit 6f42202
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ fun JDSButtonPreview() {
modifier = Modifier.padding(vertical = 16.dp, horizontal = 32.dp),
text = "text",
enabled = true,
textColor = JDSColor.SYSTEM,
textColor = JDSColor.ERROR,
backgroundColor = JDSColor.MAIN,
onClick = {}
)
JDSButton(
modifier = Modifier.padding(vertical = 16.dp, horizontal = 32.dp),
text = "text",
enabled = false,
textColor = JDSColor.SYSTEM,
textColor = JDSColor.ERROR,
backgroundColor = JDSColor.MAIN,
onClick = {}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fun JDSOutlinedButtonPreview() {
modifier = Modifier.padding(vertical = 16.dp, horizontal = 32.dp),
text = "text",
enabled = true,
textColor = JDSColor.SYSTEM,
textColor = JDSColor.ERROR,
backgroundColor = JDSColor.MAIN,
borderColor = JDSColor.Black,
onClick = {}
Expand All @@ -82,7 +82,7 @@ fun JDSOutlinedButtonPreview() {
modifier = Modifier.padding(vertical = 16.dp, horizontal = 32.dp),
text = "text",
enabled = false,
textColor = JDSColor.SYSTEM,
textColor = JDSColor.ERROR,
backgroundColor = JDSColor.MAIN,
borderColor = JDSColor.Black,
onClick = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fun JDSToggleButton(
val backgroundColor by remember {
derivedStateOf {
lerp(
JDSColor.MAIN, JDSColor.GRAY300,
JDSColor.MAIN, JDSColor.GRAY200,
swipeableState.offset.value / sizePx
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ package com.jusiCool.jds_component.color
import androidx.compose.ui.graphics.Color

object JDSColor {
val MAIN = Color(0xFF1243F1)
val Black = Color(0xFF333333)
val MAIN = Color(0xFF2756F1)
val Black = Color(0xFF000000)
val WHITE = Color(0xFFFFFFFF)

val GRAY900 = Color(0xFF4F4F51)
val GRAY800 = Color(0xFF666669)
val GRAY700 = Color(0xFF828387)
val GRAY600 = Color(0xFF8F9094)
val GRAY500 = Color(0xFFA5A6A9)
val GRAY400 = Color(0xFFB4B5B7)
val GRAY300 = Color(0xFFDBDCDE)
val GRAY200 = Color(0xFFEFF0F2)
val GRAY100 = Color(0xFFF5F6F8)
val GRAY800 = Color(0xFF3C3C3E)
val GRAY700 = Color(0xFF4F4F51)
val GRAY600 = Color(0xFF666669)
val GRAY500 = Color(0xFF8F9094)
val GRAY400 = Color(0xFFA5A6A9)
val GRAY300 = Color(0xFFB4B5B7)
val GRAY200 = Color(0xFFCBCCCE)
val GRAY100 = Color(0xFFEFF0F2)
val GRAY50 = Color(0xFFF5F6F8)

val GRAY2 = Color(0xFFA3A3A3)
val GRAY1 = Color(0xFFB9B9BC)
val GRAY2 = Color(0xFFB4B5B7)
val GRAY1 = Color(0xFFB8B8B8)

val SYSTEM = Color(0xFFDF454A)
val ERROR = Color(0xFFDF454A)
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fun JDSTextField(
) {
Text(
text = label,
color = if (isError) JDSColor.SYSTEM else JDSColor.Black,
color = if (isError) JDSColor.ERROR else JDSColor.Black,
style = JDSTypography.bodySmall
)

Expand All @@ -69,13 +69,13 @@ fun JDSTextField(
modifier = Modifier
.border(
width = 1.dp,
color = if (isFocused.value && textFieldOutlineColor == JDSColor.GRAY200) JDSColor.MAIN else textFieldOutlineColor,
color = if (isFocused.value && textFieldOutlineColor == JDSColor.GRAY100) JDSColor.MAIN else textFieldOutlineColor,
shape = RoundedCornerShape(size = 8.dp)
)
.height(54.dp)
.fillMaxWidth()
.background(
color = if(isEnabled) JDSColor.WHITE else JDSColor.GRAY200,
color = if(isEnabled) JDSColor.WHITE else JDSColor.GRAY100,
shape = RoundedCornerShape(size = 8.dp)
)
.padding(
Expand Down Expand Up @@ -107,7 +107,7 @@ fun JDSTextField(

Text(
text = supportText,
color = if (isError) JDSColor.SYSTEM else JDSColor.MAIN,
color = if (isError) JDSColor.ERROR else JDSColor.MAIN,
style = JDSTypography.labelLarge,
modifier = if (!isError) Modifier
.align(Alignment.End)
Expand All @@ -129,7 +129,7 @@ fun JDSTextFieldPreview() {
modifier = Modifier.width(312.dp),
label = "아이디",
textFieldInfo = "아이디를 입력해주세요",
textFieldOutlineColor = JDSColor.GRAY200,
textFieldOutlineColor = JDSColor.GRAY100,
textState = textState,
onTextChange = onTextChange
)
Expand All @@ -147,7 +147,7 @@ fun JDSTextFieldPreview() {
modifier = Modifier.width(312.dp),
label = "아이디",
textFieldInfo = "아이디를 입력해주세요",
textFieldOutlineColor = JDSColor.GRAY300,
textFieldOutlineColor = JDSColor.GRAY200,
isEnabled = false,
textState = textState,
onTextChange = onTextChange
Expand All @@ -157,7 +157,7 @@ fun JDSTextFieldPreview() {
modifier = Modifier.width(312.dp),
label = "아이디",
textFieldInfo = "아이디를 입력해주세요",
textFieldOutlineColor = JDSColor.SYSTEM,
textFieldOutlineColor = JDSColor.ERROR,
supportText = "Error",
isError = true,
textState = textState,
Expand All @@ -168,7 +168,7 @@ fun JDSTextFieldPreview() {
modifier = Modifier.width(312.dp),
label = "아이디",
textFieldInfo = "아이디를 입력해주세요",
textFieldOutlineColor = JDSColor.GRAY200,
textFieldOutlineColor = JDSColor.GRAY100,
textState = textState,
onTextChange = onTextChange,
visualTransformation = PasswordVisualTransformation()
Expand All @@ -178,7 +178,7 @@ fun JDSTextFieldPreview() {
modifier = Modifier.width(312.dp),
label = "아이디",
textFieldInfo = "아이디를 입력해주세요",
textFieldOutlineColor = JDSColor.SYSTEM,
textFieldOutlineColor = JDSColor.ERROR,
supportText = "영문, 숫자, 특수문자 중 2개 이상의 조합으로 8글자 이상",
textState = textState,
onTextChange = onTextChange
Expand All @@ -188,7 +188,7 @@ fun JDSTextFieldPreview() {
modifier = Modifier.width(312.dp),
label = "아이디",
textFieldInfo = "아이디를 입력해주세요",
textFieldOutlineColor = JDSColor.SYSTEM,
textFieldOutlineColor = JDSColor.ERROR,
supportText = "이메일 수정하기",
textState = textState,
onTextChange = onTextChange,
Expand Down

0 comments on commit 6f42202

Please sign in to comment.