Newer
Older
import styles from "../assets/stylesheets/chat-command-help.scss";
export default class ChatCommandHelp extends Component {
static propTypes = {
matchingPrefix: PropTypes.string
};
const commands = ["help", "leave", "fly", "bigger", "smaller", "duck"];
{commands.map(
c =>
(this.props.matchingPrefix === "" || c.startsWith(this.props.matchingPrefix)) && (
<div className={styles.entry} key={c}>
<div className={styles.command}>/{c}</div>
<div>
<FormattedMessage id={`commands.${c}`} />
</div>
</div>
)
)}