mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 15:15:34 +00:00
32 lines
583 B
JavaScript
32 lines
583 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>;
|
|
}
|
|
|
|
}
|