You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/components/Tip/TextTip/TextTip.tsx

40 lines
714 B

import clsx from 'clsx';
import { PropsWithChildren } from 'react';
import { Icon } from '@@/Icon';
type Color = 'orange' | 'blue';
export interface Props {
color?: Color;
}
export function TextTip({
color = 'orange',
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="text-muted small vertical-center">
<Icon
icon="alert-circle"
feather
className={clsx(`${iconClass}`, 'space-right')}
/>
{children}
</p>
);
}