X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Ftracker%2FCountDisplay.js;h=8282422486c92059f574a70f7ea0715e2bf37f53;hb=249e06be11d0f7778d99956c87d4f0a8ac7e69f7;hp=ed9b91fc5efbd63955f67bc273d4aa88b246a358;hpb=4a9ad147aedfae6d5488a7121cacf9a18775ff21;p=alttp.git diff --git a/resources/js/components/tracker/CountDisplay.js b/resources/js/components/tracker/CountDisplay.js index ed9b91f..8282422 100644 --- a/resources/js/components/tracker/CountDisplay.js +++ b/resources/js/components/tracker/CountDisplay.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; import React from 'react'; -const CountDisplay = ({ className, count }) => { +const CountDisplay = ({ className, count, full }) => { const classNames = ['count-display']; if (className) { classNames.push(className); @@ -9,6 +9,9 @@ const CountDisplay = ({ className, count }) => { if (!count) { classNames.push('is-zero'); } + if (full && count >= full) { + classNames.push('is-full'); + } return {count} ; @@ -17,6 +20,7 @@ const CountDisplay = ({ className, count }) => { CountDisplay.propTypes = { className: PropTypes.string, count: PropTypes.number, + full: PropTypes.number, }; export default CountDisplay;