mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
fix(edge/update): remove schedule date for old envs [EE-3023] (#8315)
This commit is contained in:
parent
c9aae27b29
commit
851a3346a9
7 changed files with 57 additions and 50 deletions
|
@ -1,41 +1,35 @@
|
|||
import clsx from 'clsx';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import { AlertCircle } from 'lucide-react';
|
||||
|
||||
import { Icon } from '@@/Icon';
|
||||
import { Icon, IconMode } from '@@/Icon';
|
||||
|
||||
type Color = 'orange' | 'blue';
|
||||
|
||||
export interface Props {
|
||||
icon?: React.ReactNode;
|
||||
color?: Color;
|
||||
}
|
||||
|
||||
export function TextTip({
|
||||
color = 'orange',
|
||||
icon = AlertCircle,
|
||||
children,
|
||||
}: PropsWithChildren<Props>) {
|
||||
let iconClass: string;
|
||||
|
||||
switch (color) {
|
||||
case 'blue':
|
||||
iconClass = 'icon-primary';
|
||||
break;
|
||||
case 'orange':
|
||||
iconClass = 'icon-warning';
|
||||
break;
|
||||
default:
|
||||
iconClass = 'icon-warning';
|
||||
}
|
||||
|
||||
return (
|
||||
<p className="small vertical-center">
|
||||
<i className="icon-container">
|
||||
<Icon
|
||||
icon={AlertCircle}
|
||||
className={clsx(`${iconClass}`, 'space-right')}
|
||||
/>
|
||||
</i>
|
||||
<p className="small flex items-center gap-1">
|
||||
<Icon icon={icon} mode={getMode(color)} />
|
||||
|
||||
<span className="text-muted">{children}</span>
|
||||
</p>
|
||||
);
|
||||
}
|
||||
|
||||
function getMode(color: Color): IconMode {
|
||||
switch (color) {
|
||||
case 'blue':
|
||||
return 'primary';
|
||||
case 'orange':
|
||||
default:
|
||||
return 'warning';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue