mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 14:45:35 +00:00
30 lines
581 B
JavaScript
30 lines
581 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import { autoBind } from 'react-extras';
|
|
|
|
/**
|
|
* Announcement component
|
|
*/
|
|
export default class Announcement extends React.Component {
|
|
static propTypes = {
|
|
text: PropTypes.string
|
|
};
|
|
|
|
/**
|
|
* Constructor
|
|
* @param {Object} props React Component properties
|
|
*/
|
|
constructor(props) {
|
|
super(props);
|
|
autoBind(this);
|
|
}
|
|
|
|
/**
|
|
* Renders the announcement
|
|
* @return {React.Component} A href element
|
|
*/
|
|
render() {
|
|
return <div className="announcement" >{this.props.text}</div>;
|
|
}
|
|
}
|