22 lines
521 B
React
22 lines
521 B
React
|
// @flow
|
||
|
import React from 'react';
|
||
|
|
||
|
type Props = {
|
||
|
message?: {
|
||
|
to: string,
|
||
|
msg: string
|
||
|
}
|
||
|
};
|
||
|
|
||
|
export default function CustomMessage(props: Props) {
|
||
|
return (
|
||
|
<div className="clearfix form-group">
|
||
|
{!!props.message &&
|
||
|
<div className="alert alert-info col-xs-12 clearfix">
|
||
|
<p><small>A message from {props.message.to}</small></p>
|
||
|
<p><strong>{props.message.msg}</strong></p>
|
||
|
</div>}
|
||
|
</div>
|
||
|
);
|
||
|
}
|