1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-08 23:35:31 +02:00

feat(waiting-room): add beta alert to assignment [EE-5384] (#9028)

This commit is contained in:
Chaim Lev-Ari 2023-06-08 06:02:36 +07:00 committed by GitHub
parent 73950f3603
commit 8129e7590b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 14 deletions

View file

@ -1,24 +1,26 @@
import { ReactNode } from 'react';
import betaIcon from '@/assets/ico/beta.svg?c';
import { TextTip } from '@@/Tip/TextTip';
interface Props {
message: string;
message: ReactNode;
className?: string;
isHtml?: boolean;
}
export function BetaAlert({ message, className, isHtml }: Props) {
return (
<TextTip
icon="svg-beta"
className={className}
childrenWrapperClassName="text-warning"
>
{!isHtml ? (
message
) : (
// eslint-disable-next-line react/no-danger
<span dangerouslySetInnerHTML={{ __html: message }} />
)}
<TextTip icon={betaIcon} className={className}>
<div className="text-warning">
{isHtml && typeof message === 'string' ? (
// eslint-disable-next-line react/no-danger
<span dangerouslySetInnerHTML={{ __html: message }} />
) : (
message
)}
</div>
</TextTip>
);
}