1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 08:19:40 +02:00

fix(edge/update): remove schedule date for old envs [EE-3023] (#8315)

This commit is contained in:
Chaim Lev-Ari 2023-01-24 12:20:55 +05:30 committed by GitHub
parent c9aae27b29
commit 851a3346a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 57 additions and 50 deletions

View file

@ -25,14 +25,10 @@ export function InformationPanel({
<WidgetBody className={bodyClassName}>
<div style={wrapperStyle}>
{title && (
<div className="col-sm-12 form-section-title">
<span style={{ float: 'left' }}>{title}</span>
<div className="form-section-title">
<span>{title}</span>
{!!onDismiss && (
<span
className="small"
style={{ float: 'right' }}
ng-if="dismissAction"
>
<span className="small" style={{ float: 'right' }}>
<Button color="link" icon={X} onClick={() => onDismiss()}>
dismiss
</Button>

View file

@ -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';
}
}