-
Notifications
You must be signed in to change notification settings - Fork 1
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/mz 156 badge #22
Conversation
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.
๋์์ด๋๋ถ์ด ์ ํด์ฃผ์ color ํ์ ๋ง์ถฐ์ enum class๋ฅผ ๋ง๋ค๋ฉด ๊ฐ๋ฐ ์๋๊ฐ ๋ ์ฌ๋ผ๊ฐ๊ฑฐ๊ฐ์์.
enum class BadgeColor (
val backgroundColor: Color,
val textColor: Color,
) { Red60(backgroundColor = ...)
}
Spacer๋ ๋ง์ฐฌ๊ฐ์ง๋ก ๋บ ์ ์์๊ฑฐ๊ฐ๋ค์~! ์์ธํ๊ฑด ์ ๊ฐ ํด๋์ Button ์ปดํฌ๋ํธ ๋ณด์๋ฉด ์ข์๊ฑฐ๊ฐ์ต๋๋ค!
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.
์ง์ฑ๋ ํผ๋๋ฐฑ ์ ์ฉ๋๋ฉด ์ ๋ Re-Request Review ํ๋ฒ ๋๋ฌ์ฃผ์ธ์!
๋ค์ ํ ๋ฒ ์ฝ๋ ๋ฆฌ๋ทฐ ๋ถํ๋๋ฆฝ๋๋ค! |
BadgeGray20( | ||
backgroundColor = Gray20, | ||
textColor = Gray70, | ||
), | ||
BadgeOrange60( | ||
backgroundColor = Orange60, | ||
textColor = Gray10, | ||
), | ||
BadgeBlue60( | ||
backgroundColor = Blue60, | ||
textColor = Gray10, | ||
), | ||
BadgeGray90( | ||
backgroundColor = Gray90, | ||
textColor = Gray10, | ||
), | ||
BadgeGray40( | ||
backgroundColor = Gray40, | ||
textColor = Gray10, | ||
), | ||
BadgeGray30( | ||
backgroundColor = Gray30, | ||
textColor = Gray70, | ||
), | ||
BadgeRed60( | ||
backgroundColor = Red60, | ||
textColor = Gray10, | ||
), |
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.
Badge ์ ๋์ด ์์ ๋ ๋ ๊ฑฐ๊ฐ์์
SmallBadgePadding( | ||
verticalPadding = 2.dp | ||
), | ||
ExtraSmallBadgePadding, |
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.
Badge ์์ด๋ ๋ ๊ฑฐ๊ฐ์์~!
SmallBadgePadding -> Small
SusuTheme์ ์ ์๋ Spacing ์ฌ์ฉํ๋๊ฒ ๋ ์ข์๊ฑฐ๊ฐ๋ค์ฉ
import com.susu.core.designsystem.theme.SusuTheme | ||
|
||
@Composable | ||
fun SusuExtraSmallBadge( |
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.
SusuBadge ํ๋๋ก ๋ง๋ค ์ ์์ง ์์๊น์?
val horizontalPadding = padding().horizontalPadding | ||
val verticalPadding = padding().verticalPadding | ||
|
||
Box( | ||
modifier = modifier.background(color.backgroundColor, shape), | ||
) { | ||
Text( | ||
text = text, | ||
style = SusuTheme.typography.title_xxxs, | ||
color = color.textColor, | ||
modifier = modifier.padding( | ||
horizontal = horizontalPadding, | ||
vertical = verticalPadding, | ||
), | ||
) | ||
} |
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.
์ด๋ ๊ฒ ํ๋ฉด padding() ๋๋ค๊ฐ 2๋ฒ ์คํ๋๋ ๋ฌธ์ ๊ฐ ์์ต๋๋ค!
val horizontalPadding = padding().horizontalPadding | |
val verticalPadding = padding().verticalPadding | |
Box( | |
modifier = modifier.background(color.backgroundColor, shape), | |
) { | |
Text( | |
text = text, | |
style = SusuTheme.typography.title_xxxs, | |
color = color.textColor, | |
modifier = modifier.padding( | |
horizontal = horizontalPadding, | |
vertical = verticalPadding, | |
), | |
) | |
} | |
with(padding()) { | |
Box( | |
modifier = modifier.background(color.backgroundColor, shape), | |
) { | |
Text( | |
text = text, | |
style = SusuTheme.typography.title_xxxs, | |
color = color.textColor, | |
modifier = modifier.padding( | |
horizontal = horizontalPadding, | |
vertical = verticalPadding, | |
), | |
) | |
} | |
} |
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.
๋ง์ง๋ง์ผ๋ก ํ๋๋ง ๋ฐ์ํด์ฃผ์๋ฉด ์ข์๊ฑฐ๊ฐ์์!
๋ฏธ๋ฆฌ ์ดํ๋ก๋ธ ํ๊ฒ ์ต๋๋ค~
๐ก Issue
๐ฑ Key changes
Badge ์์ ํ์ต๋๋ค.
โ To Reviewers
Figma์์ properties๋ฅผ ํ์ธํด๋ณด๋ ์ฌ์ด์ฆ๊ฐ xs, s ๋ก ๋๋์ด์ ธ ์์ด์ ๋ถ๋ฆฌํ์ต๋๋ค.
๐ธ ์คํฌ๋ฆฐ์ท