This repository has been archived on 2025-05-09. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Astral-nook/resources/scripts/components/MessageBox.tsx
2019-06-09 19:26:20 -07:00

14 lines
397 B
TypeScript

import * as React from 'react';
interface Props {
title?: string;
message: string;
type?: 'success' | 'info' | 'warning' | 'error';
}
export default ({ title, message, type }: Props) => (
<div className={`lg:inline-flex alert ${type}`} role={'alert'}>
{title && <span className={'title'}>{title}</span>}
<span className={'message'}>{message}</span>
</div>
);