Some checks failed
Branch Build CE / Build Setup (push) Has been cancelled
Branch Build CE / Build-Push Admin Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Web Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Space Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Live Collaboration Docker Image (push) Has been cancelled
Branch Build CE / Build-Push API Server Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Proxy Docker Image (push) Has been cancelled
Branch Build CE / Build-Push AIO Docker Image (push) Has been cancelled
Branch Build CE / Upload Build Assets (push) Has been cancelled
Branch Build CE / Build Release (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Codespell / Check for spelling errors (push) Has been cancelled
Sync Repositories / sync_changes (push) Has been cancelled
31 lines
1.2 KiB
TypeScript
31 lines
1.2 KiB
TypeScript
import { Info } from "lucide-react";
|
|
// plane constants
|
|
import type { TAdminAuthErrorInfo } from "@plane/constants";
|
|
// icons
|
|
import { CloseIcon } from "@plane/propel/icons";
|
|
|
|
type TAuthBanner = {
|
|
bannerData: TAdminAuthErrorInfo | undefined;
|
|
handleBannerData?: (bannerData: TAdminAuthErrorInfo | undefined) => void;
|
|
};
|
|
|
|
export const AuthBanner: React.FC<TAuthBanner> = (props) => {
|
|
const { bannerData, handleBannerData } = props;
|
|
|
|
if (!bannerData) return <></>;
|
|
return (
|
|
<div className="relative flex items-center p-2 rounded-md gap-2 border border-custom-primary-100/50 bg-custom-primary-100/10">
|
|
<div className="w-4 h-4 flex-shrink-0 relative flex justify-center items-center">
|
|
<Info size={16} className="text-custom-primary-100" />
|
|
</div>
|
|
<div className="w-full text-sm font-medium text-custom-primary-100">{bannerData?.message}</div>
|
|
<div
|
|
className="relative ml-auto w-6 h-6 rounded-sm flex justify-center items-center transition-all cursor-pointer hover:bg-custom-primary-100/20 text-custom-primary-100/80"
|
|
onClick={() => handleBannerData && handleBannerData(undefined)}
|
|
>
|
|
<CloseIcon className="w-4 h-4 flex-shrink-0" />
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|