mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
25 lines
641 B
TypeScript
25 lines
641 B
TypeScript
import { IconLockAccessOff } from "@tabler/icons-react";
|
|
import { Empty, type EmptyProps } from "./Empty";
|
|
|
|
const NotFound = (props: Partial<EmptyProps>) => <Empty title="Not Found" {...props} />;
|
|
const NotAllowed = (props: Partial<EmptyProps>) => <Empty title="Not Allowed" {...props} />;
|
|
const MissingPermission = ({
|
|
what,
|
|
...props
|
|
}: Partial<EmptyProps> & {
|
|
what?: string;
|
|
}) => (
|
|
<Empty
|
|
Icon={IconLockAccessOff}
|
|
title="Missing Permission"
|
|
description={`You're not allowed to access ${what ?? "this"}.`}
|
|
{...props}
|
|
/>
|
|
);
|
|
|
|
export const Message = {
|
|
NotFound,
|
|
NotAllowed,
|
|
MissingPermission
|
|
};
|