From 5ba95a2c37b790aecf81c8e36caf6520b4e0f7d1 Mon Sep 17 00:00:00 2001 From: Su TT Date: Mon, 11 Aug 2025 11:13:59 -0400 Subject: [PATCH] Add ErrorPanelPreview --- .../schabi/newpipe/ui/components/common/ErrorPanel.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/ui/components/common/ErrorPanel.kt b/app/src/main/java/org/schabi/newpipe/ui/components/common/ErrorPanel.kt index 5224c2c2f..de6dd096e 100644 --- a/app/src/main/java/org/schabi/newpipe/ui/components/common/ErrorPanel.kt +++ b/app/src/main/java/org/schabi/newpipe/ui/components/common/ErrorPanel.kt @@ -59,7 +59,7 @@ fun ErrorPanel( Column( horizontalAlignment = Alignment.CenterHorizontally, - + modifier = modifier ) { Text( @@ -126,5 +126,12 @@ fun ErrorPanel( @Composable fun ErrorPanelPreview() { AppTheme { + ErrorPanel( + errorInfo = ErrorInfo( + throwable = Exception("Network error"), + userAction = org.schabi.newpipe.error.UserAction.UI_ERROR, + request = "Preview request" + ) + ) } }