Skip to content

Commit

Permalink
feat :: DMSActionSheet 버튼 선택 범위 넓히기
Browse files Browse the repository at this point in the history
  • Loading branch information
DSMInhyeKang committed Apr 4, 2023
1 parent f9d8dbf commit a15c11f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,24 +70,29 @@ struct ChangeProfileView: View {
.padding(.horizontal, 24)
.dmsBackground()
.dmsActionSheet(isPresented: $isPresentedImageActionSheet) {
Button(role: nil) {
isPresentedImageActionSheet = false
isShowingCameraPicker.toggle()
} label: {
Label("사진 촬영", systemImage: "camera.fill")
}
.foregroundColor(.GrayScale.gray6)

Divider()
.foregroundColor(.GrayScale.gray4)

Button(role: nil) {
isPresentedImageActionSheet = false
isShowingImagePicker.toggle()
} label: {
Label("사진 선택", systemImage: "photo.tv")
VStack {
Button(role: nil) {
isPresentedImageActionSheet = false
isShowingCameraPicker.toggle()
} label: {
Label("사진 촬영", systemImage: "camera.fill")
Spacer()
}
.foregroundColor(.GrayScale.gray6)

Divider()
.foregroundColor(.GrayScale.gray4)

Button(role: nil) {
isPresentedImageActionSheet = false
isShowingImagePicker.toggle()
} label: {
Label("사진 선택", systemImage: "photo.tv")
Spacer()
}
.foregroundColor(.GrayScale.gray6)
}
.foregroundColor(.GrayScale.gray6)
.frame(width: UIScreen.main.bounds.width - 48)
}
.onChange(of: viewModel.isSuccessChangeImage) { newValue in
if newValue {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ struct DMSActionSheet<Actions: View>: ViewModifier {
}

GroupBox {
Button("취소", role: .cancel) {
Button(role: .cancel) {
isPresented = false
} label: {
Text("취소")
.frame(width: UIScreen.main.bounds.width - 48, alignment: .center)
}
.foregroundColor(.GrayScale.gray6)
.frame(maxWidth: .infinity, alignment: .center)
}
}
.font(.title3)
Expand Down

0 comments on commit a15c11f

Please sign in to comment.