Skip to content

Commit 103312e

Browse files
committed
Add prop types for numeric display
1 parent 9c03406 commit 103312e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/components/NumericDisplay/NumericDisplay.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@ import React from 'react';
22
import PropTypes from 'prop-types';
33
import styles from './NumericDisplay.module.css';
44

5-
const NumericDisplay = ({ value }) => (
5+
const NumericDisplay = (
6+
{ value }, //display numeric values
7+
) => (
68
<div className={styles.NumericDisplay} data-testid="NumericDisplay">
9+
{/*display numeric values with styles*/}
710
{value}
11+
{/*bold the numeric value*/}
812
</div>
913
);
1014

11-
NumericDisplay.propTypes = {};
15+
NumericDisplay.propTypes = { value: PropTypes.number.isRequired };
1216

1317
NumericDisplay.defaultProps = {};
1418

0 commit comments

Comments
 (0)