mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 12:56:05 +00:00
reworked admin auth to use form and cookie + adjusted oauth to support API and cookie-based auth
This commit is contained in:
@@ -14,22 +14,30 @@ const Base: React.FC<AlertProps> = ({ visible = true, title, message, className,
|
||||
{...props}
|
||||
className={twMerge("flex flex-row dark:bg-amber-300/20 bg-amber-200 p-4", className)}
|
||||
>
|
||||
<div>
|
||||
{title && <b className="mr-2">{title}:</b>}
|
||||
{message}
|
||||
</div>
|
||||
{title && <b className="mr-2">{title}:</b>}
|
||||
{message}
|
||||
</div>
|
||||
) : null;
|
||||
|
||||
const Warning: React.FC<AlertProps> = (props) => (
|
||||
<Base {...props} className="dark:bg-amber-300/20 bg-amber-200" />
|
||||
const Warning: React.FC<AlertProps> = ({ className, ...props }) => (
|
||||
<Base {...props} className={twMerge("dark:bg-amber-300/20 bg-amber-200", className)} />
|
||||
);
|
||||
|
||||
const Exception: React.FC<AlertProps> = (props) => (
|
||||
<Base {...props} className="dark:bg-red-950 bg-red-100" />
|
||||
const Exception: React.FC<AlertProps> = ({ className, ...props }) => (
|
||||
<Base {...props} className={twMerge("dark:bg-red-950 bg-red-100", className)} />
|
||||
);
|
||||
|
||||
const Success: React.FC<AlertProps> = ({ className, ...props }) => (
|
||||
<Base {...props} className={twMerge("dark:bg-green-950 bg-green-100", className)} />
|
||||
);
|
||||
|
||||
const Info: React.FC<AlertProps> = ({ className, ...props }) => (
|
||||
<Base {...props} className={twMerge("dark:bg-blue-950 bg-blue-100", className)} />
|
||||
);
|
||||
|
||||
export const Alert = {
|
||||
Warning,
|
||||
Exception
|
||||
Exception,
|
||||
Success,
|
||||
Info
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user