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

[UI/#64] 스크랩 취소 다이얼로그 및 말줄임 구현 #74

Merged
merged 10 commits into from
Jul 15, 2024

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
package com.terning.core.designsystem.component.dialog

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import com.terning.core.R
import com.terning.core.designsystem.component.button.RoundButton
import com.terning.core.designsystem.theme.Grey300
import com.terning.core.designsystem.theme.TerningTheme
import com.terning.core.designsystem.theme.White
import com.terning.core.extension.noRippleClickable

@Composable
fun TerningBasicDialog(
Expand All @@ -20,21 +38,35 @@ fun TerningBasicDialog(
onDismissRequest = { onDismissRequest() },
properties = properties,
) {
content()
}
}

@Preview(showBackground = true, showSystemUi = true)
@Composable
fun TerningBasicDialogPreview() {
TerningBasicDialog(
onDismissRequest = {},
content = {
ScrapDialogContent(
onDismissRequest = {},
isScrapped = false,
internInfoList = listOf()
)
Box(
modifier = Modifier
.fillMaxWidth()
.wrapContentHeight()
.padding(30.dp)
.background(
color = White,
shape = RoundedCornerShape(20.dp)
),
) {
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.End
) {
IconButton(
onClick = { onDismissRequest() },
modifier = Modifier
.padding(6.dp)
) {
Icon(
painter = painterResource(id = R.drawable.ic_dialog_x_32),
contentDescription = null,
tint = Grey300,
modifier = Modifier
.noRippleClickable { onDismissRequest() }
)
}
}
content()
}
)
}
}
3 changes: 3 additions & 0 deletions core/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
<string name="dialog_content_scrap_sub_title">공고를 캘린더에 스크랩하시겠어요?</string>
<string name="dialog_content_color_button">색상</string>
<string name="dialog_scrap_button">내 캘린더에 스크랩하기</string>
<string name="dialog_content_scrap_cancel_main_title">관심 공고가 캘린더에서 사라져요!</string>
<string name="dialog_content_scrap_cancel_sub_title">스크랩을 취소하시겠어요?</string>
<string name="dialog_scrap_cancel_button">스크랩 취소하기</string>

<!--Intern-->
<string name="intern_info_d_day">서류 마감</string>
Expand Down
Loading
Loading