Files
jitsi-meet/react/features/toolbar/components/Notice.js
Ilya Daynatovich 74b5638d99 Add jsdocs, apply manual formatting
https://github.com/jitsi/jitsi-meet/pull/1397 (React Toolbar) is huge at
the time of this writing. In order to reduce it, I'm extracting changes
not directly related to React-ifying the Toolbar such as added jsdocs
and source code formatting.
2017-03-31 15:02:24 -05:00

58 lines
1.1 KiB
JavaScript

/* @flow */
import React, { Component } from 'react';
declare var config: Object;
/**
* Notice react component.
*
* @class Notice
*/
export default class Notice extends Component {
state: Object;
/**
* Constructor of Notice component.
*
* @param {Object} props - The read-only React Component props with which
* the new instance is to be initialized.
*/
constructor(props: Object) {
super(props);
const { noticeMessage } = config;
this.state = {
/**
* Message to be shown in notice component.
*
* @type {string}
*/
noticeMessage
};
}
/**
* Implements React's {@link Component#render()}.
*
* @inheritdoc
* @returns {ReactElement}
*/
render() {
const { noticeMessage } = this.state;
if (!noticeMessage) {
return null;
}
return (
<div className = 'notice'>
<span className = 'notice__message' >
{ noticeMessage }
</span>
</div>
);
}
}