Migrate the existing login form to use React
This commit is contained in:
parent
0ab3768274
commit
d9f30294de
15 changed files with 322 additions and 72 deletions
14
resources/scripts/components/MessageBox.tsx
Normal file
14
resources/scripts/components/MessageBox.tsx
Normal file
|
@ -0,0 +1,14 @@
|
|||
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>
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue