import { Component, ReactNode, createElement } from "react";
import classNames from "classnames";

export interface AlertProps {
    message?: string;
    className?: string;
    bootstrapStyle: "default" | "primary" | "success" | "info" | "inverse" | "warning" | "danger";
}

export class Alert extends Component<AlertProps> {
    render(): ReactNode {
        return this.props.message
            ? (<div className={classNames(`alert alert-${this.props.bootstrapStyle}`, this.props.className)}>{this.props.message}</div>)
            : null;
    }
}
