aboutsummaryrefslogtreecommitdiff
path: root/src/components/ErrorCard.tsx
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2023-02-25 19:10:01 +0100
committerVendicated <vendicated@riseup.net>2023-02-25 19:10:01 +0100
commit128ee41252b1bf9c3e415ec94ce26d5dc3e7c7ee (patch)
treeef393cbeceb10886c3edba7a2d1bbab4e6d298c5 /src/components/ErrorCard.tsx
parentccca41a16832a34efa83506a6baf23d8bd2a6367 (diff)
downloadVencord-128ee41252b1bf9c3e415ec94ce26d5dc3e7c7ee.tar.gz
Vencord-128ee41252b1bf9c3e415ec94ce26d5dc3e7c7ee.tar.bz2
Vencord-128ee41252b1bf9c3e415ec94ce26d5dc3e7c7ee.zip
ErrorBoundary: Do not use any Discord components to be more robust
Diffstat (limited to 'src/components/ErrorCard.tsx')
-rw-r--r--src/components/ErrorCard.tsx23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/components/ErrorCard.tsx b/src/components/ErrorCard.tsx
index e749ea4..7ce8cad 100644
--- a/src/components/ErrorCard.tsx
+++ b/src/components/ErrorCard.tsx
@@ -16,24 +16,15 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { Card } from "@webpack/common";
+import "./ErrorCard.css";
-interface Props {
- style?: React.CSSProperties;
- className?: string;
-}
-export function ErrorCard(props: React.PropsWithChildren<Props>) {
+import { classes } from "@utils/misc";
+import type { HTMLProps } from "react";
+
+export function ErrorCard(props: React.PropsWithChildren<HTMLProps<HTMLDivElement>>) {
return (
- <Card className={props.className} style={
- {
- padding: "2em",
- backgroundColor: "#e7828430",
- borderColor: "#e78284",
- color: "var(--text-normal)",
- ...props.style
- }
- }>
+ <div {...props} className={classes(props.className, "vc-error-card")}>
{props.children}
- </Card>
+ </div>
);
}