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

[System] ConfirmButton 디자인시스템 적용 #26

Merged
merged 4 commits into from
Jan 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import androidx.compose.runtime.SideEffect
import com.google.accompanist.systemuicontroller.rememberSystemUiController

private val DarkColorPalette = darkColors(
primary = Primary2,
primary = Gray000,
primaryVariant = Primary4,
secondary = Secondary1,
background = Gray600,
Expand All @@ -21,7 +21,7 @@ private val DarkColorPalette = darkColors(
)

private val LightColorPalette = lightColors(
primary = Primary4,
primary = Gray800,
primaryVariant = Primary1,
secondary = Secondary2,
background = Gray200,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package ac.dnd.bookkeeping.android.presentation.common.view

import ac.dnd.bookkeeping.android.presentation.common.view.confirm.ConfirmButton
import ac.dnd.bookkeeping.android.presentation.common.view.confirm.ConfirmButtonProperties
import ac.dnd.bookkeeping.android.presentation.common.view.confirm.ConfirmButtonSize
import ac.dnd.bookkeeping.android.presentation.common.view.confirm.ConfirmButtonType
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
Expand Down Expand Up @@ -70,12 +74,19 @@ fun BottomSheetScreenPreview1() {

ConfirmButton(
modifier = Modifier.fillMaxWidth(),
text = "확인",
isMain = true,
properties = ConfirmButtonProperties(
size = ConfirmButtonSize.Large,
type = ConfirmButtonType.Primary
),
onClick = {
isShowing = false
}
)
) { style ->
Text(
text = "확인",
style = style
)
}
}
}
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package ac.dnd.bookkeeping.android.presentation.common.view

import ac.dnd.bookkeeping.android.presentation.R
import ac.dnd.bookkeeping.android.presentation.common.view.confirm.ConfirmButton
import ac.dnd.bookkeeping.android.presentation.common.view.confirm.ConfirmButtonProperties
import ac.dnd.bookkeeping.android.presentation.common.view.confirm.ConfirmButtonSize
import ac.dnd.bookkeeping.android.presentation.common.view.confirm.ConfirmButtonType
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
Expand Down Expand Up @@ -82,27 +86,41 @@ fun DialogScreen(
Row(modifier = Modifier.wrapContentSize()) {
if (onCancel != null) {
ConfirmButton(
text = cancelMessage,
isMain = false,
properties = ConfirmButtonProperties(
size = ConfirmButtonSize.Large,
type = ConfirmButtonType.Secondary
),
modifier = Modifier.weight(1f),
onClick = {
onCancel()
onDismissRequest()
}
)
) { style ->
Text(
text = cancelMessage,
style = style
)
}

Spacer(modifier = Modifier.width(10.dp))
}

ConfirmButton(
text = confirmMessage,
isMain = true,
properties = ConfirmButtonProperties(
size = ConfirmButtonSize.Large,
type = ConfirmButtonType.Primary
),
modifier = Modifier.weight(1f),
onClick = {
onConfirm()
onDismissRequest()
}
)
) { style ->
Text(
text = confirmMessage,
style = style
)
}
}
}
}
Expand Down
Loading
Loading