feat(proj): init
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
type Props = {
|
||||
error?: string | null;
|
||||
notice?: string | null;
|
||||
};
|
||||
|
||||
export function Flash({ error = null, notice = null }: Props) {
|
||||
if (!error && !notice) return null;
|
||||
return (
|
||||
<div className="flash" aria-live="polite">
|
||||
{error ? <p className="flash__item flash__item--error">{error}</p> : null}
|
||||
{notice ? <p className="flash__item flash__item--ok">{notice}</p> : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user