Skip to content
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

Merged
merged 10 commits into from
Jan 1, 2024
Merged

Feature/mz 156 badge #22

merged 10 commits into from
Jan 1, 2024

Conversation

syb8200
Copy link
Contributor

@syb8200 syb8200 commented Dec 29, 2023

๐Ÿ’ก Issue

๐ŸŒฑ Key changes

Badge ์ž‘์—… ํ–ˆ์Šต๋‹ˆ๋‹ค.

โœ… To Reviewers

Figma์—์„œ properties๋ฅผ ํ™•์ธํ•ด๋ณด๋‹ˆ ์‚ฌ์ด์ฆˆ๊ฐ€ xs, s ๋กœ ๋‚˜๋ˆ„์–ด์ ธ ์žˆ์–ด์„œ ๋ถ„๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ“ธ ์Šคํฌ๋ฆฐ์ƒท

SusuSmallBadge SusuExtraSmallBadge
small extra_small

@syb8200 syb8200 self-assigned this Dec 29, 2023
Copy link
Member

@jinukeu jinukeu left a 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 ์ปดํฌ๋„ŒํŠธ ๋ณด์‹œ๋ฉด ์ข‹์„๊ฑฐ๊ฐ™์Šต๋‹ˆ๋‹ค!

Copy link
Member

@yangsooplus yangsooplus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ง„์šฑ๋‹˜ ํ”ผ๋“œ๋ฐฑ ์ ์šฉ๋˜๋ฉด ์ €๋„ Re-Request Review ํ•œ๋ฒˆ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”!

@syb8200 syb8200 requested review from yangsooplus and jinukeu January 1, 2024 09:34
@syb8200
Copy link
Contributor Author

syb8200 commented Jan 1, 2024

๋‹ค์‹œ ํ•œ ๋ฒˆ ์ฝ”๋“œ ๋ฆฌ๋ทฐ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค!
@yangsooplus @jinukeu

Comment on lines 18 to 45
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,
),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Badge ์ ‘๋‘์–ด ์—†์• ๋„ ๋ ๊ฑฐ๊ฐ™์•„์š”

Comment on lines 10 to 13
SmallBadgePadding(
verticalPadding = 2.dp
),
ExtraSmallBadgePadding,
Copy link
Member

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(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SusuBadge ํ•˜๋‚˜๋กœ ๋งŒ๋“ค ์ˆ˜ ์žˆ์ง€ ์•Š์„๊นŒ์š”?

@syb8200 syb8200 requested a review from jinukeu January 1, 2024 12:11
Comment on lines 26 to 41
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,
),
)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ด๋ ‡๊ฒŒ ํ•˜๋ฉด padding() ๋žŒ๋‹ค๊ฐ€ 2๋ฒˆ ์‹คํ–‰๋˜๋Š” ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค!

Suggested change
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,
),
)
}
}

Copy link
Member

@jinukeu jinukeu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋งˆ์ง€๋ง‰์œผ๋กœ ํ•˜๋‚˜๋งŒ ๋ฐ˜์˜ํ•ด์ฃผ์‹œ๋ฉด ์ข‹์„๊ฑฐ๊ฐ™์•„์š”!
๋ฏธ๋ฆฌ ์–ดํ”„๋กœ๋ธŒ ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค~

@syb8200 syb8200 merged commit 1387897 into develop Jan 1, 2024
1 check passed
@jinukeu jinukeu deleted the feature/MZ-156-badge branch January 15, 2024 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] Badge
3 participants