mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
ESLint 4.8.0 discovers a lot of error related to formatting. While I tried to fix as many of them as possible, a portion of them actually go against our coding style. In such a case, I've disabled the indent rule which effectively leaves it as it was before ESLint 4.8.0. Additionally, remove jshint because it's becoming a nuisance with its lack of understanding of ES2015+.
40 lines
899 B
JavaScript
40 lines
899 B
JavaScript
import PropTypes from 'prop-types';
|
|
import React, { Component } from 'react';
|
|
|
|
/**
|
|
* Implements a React {@link Component} to render a country flag icon.
|
|
*/
|
|
export default class CountryIcon extends Component {
|
|
/**
|
|
* {@code CountryIcon}'s property types.
|
|
*
|
|
* @static
|
|
*/
|
|
static propTypes = {
|
|
/**
|
|
* The css style class name.
|
|
*/
|
|
className: PropTypes.string,
|
|
|
|
/**
|
|
* The 2-letter country code.
|
|
*/
|
|
countryCode: PropTypes.string
|
|
};
|
|
|
|
/**
|
|
* Implements React's {@link Component#render()}.
|
|
*
|
|
* @inheritdoc
|
|
* @returns {ReactElement}
|
|
*/
|
|
render() {
|
|
const iconClassName
|
|
= `flag-icon flag-icon-${
|
|
this.props.countryCode} flag-icon-squared ${
|
|
this.props.className}`;
|
|
|
|
return <span className = { iconClassName } />;
|
|
}
|
|
}
|