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:
parent
73950f3603
commit
8129e7590b
3 changed files with 25 additions and 14 deletions
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue