File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
src/components/CostDisplay Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,13 @@ import React from 'react';
2
2
import PropTypes from 'prop-types' ;
3
3
import styles from './CostDisplay.module.css' ;
4
4
5
- const CostDisplay = ( { cost } ) => (
5
+ const CostDisplay = (
6
+ { cost } , //cost display content
7
+ ) => (
6
8
< div className = { styles . CostDisplay } data-testid = "CostDisplay" >
9
+ { /*display cost display with specified styles*/ }
7
10
Cost: < span id = "cost-value" > { cost } </ span >
11
+ { /*bold the cost numeric value*/ }
8
12
</ div >
9
13
) ;
10
14
Original file line number Diff line number Diff line change 1
1
.CostDisplay {
2
- text-align : center;
2
+ text-align : center; /*center cost display text component*/
3
3
}
4
4
# cost-value {
5
- font-weight : bold;
5
+ font-weight : bold; /*bold numeric cost value*/
6
6
}
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export default {
5
5
title : 'CostDisplay' ,
6
6
} ;
7
7
8
- export const Default = ( ) => < CostDisplay /> ;
8
+ export const Default = ( ) => < CostDisplay /> ; //default JSX component render
9
9
10
10
Default . story = {
11
11
name : 'default' ,
You can’t perform that action at this time.
0 commit comments