Files
Remington BreezeandGitHub 241596c14a feat: New components from Argo Rollouts UI in src/v2 directory (#100)
* feat: New components from Argo Rollotus UI in src/v2 directory

Signed-off-by: Remington Breeze <[email protected]>
2021-06-16 17:07:21 -07:00

30 lines
598 B
TypeScript

import * as React from 'react';
import ThemeDiv from '../theme-div/theme-div';
import './alert.scss';
export enum AlertType {
Error = 'error',
Warning = 'warning',
Success = 'success',
}
interface AlertProps {
children: string | string[];
type: AlertType;
style?: React.CSSProperties;
}
/**
* Displays important information in a colored banner
*/
export const Alert = (props: AlertProps) => {
return (
<ThemeDiv style={props.style} className={`alert alert--${props.type}`}>
{props.children}
</ThemeDiv>
);
};
export default Alert;