Skip to content

Commit fd6d012

Browse files
committed
Add OperationResultDialog.kt
1 parent f475207 commit fd6d012

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.quickfilemanager.ui.components
2+
3+
import androidx.compose.material3.*
4+
5+
@Composable
6+
fun OperationResultDialog(
7+
message: String,
8+
isError: Boolean,
9+
onDismiss: () -> Unit
10+
) {
11+
AlertDialog(
12+
onDismissRequest = onDismiss,
13+
title = { Text(if (isError) "操作失败" else "操作成功") },
14+
text = { Text(message) },
15+
confirmButton = {
16+
TextButton(onClick = onDismiss) {
17+
Text("确定")
18+
}
19+
}
20+
)
21+
}

0 commit comments

Comments
 (0)