]> git.localhorst.tv Git - alttp.git/blob - resources/js/components/tracker/CountDisplay.js
save tracker config
[alttp.git] / resources / js / components / tracker / CountDisplay.js
1 import PropTypes from 'prop-types';
2 import React from 'react';
3
4 const CountDisplay = ({ className, count }) => {
5         const classNames = ['count-display'];
6         if (className) {
7                 classNames.push(className);
8         }
9         if (!count) {
10                 classNames.push('is-zero');
11         }
12         return <span className={classNames.join(' ')}>
13                 {count}
14         </span>;
15 };
16
17 CountDisplay.propTypes = {
18         className: PropTypes.string,
19         count: PropTypes.number,
20 };
21
22 export default CountDisplay;