Clean up backgroundColor variable
This commit is contained in:
@@ -19,7 +19,7 @@ const SymptomCell = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const shouldDrawDot = symptomValue !== false
|
const shouldDrawDot = symptomValue !== false
|
||||||
// Determine the background color based on isWeekend prop
|
// Determine the background color based on isWeekend prop
|
||||||
const weekendBackgroundColor = isWeekend ? Colors.greyVeryLight : 'white'
|
const backgroundColor = isWeekend ? Colors.greyVeryLight : 'white'
|
||||||
const styleCell =
|
const styleCell =
|
||||||
index !== 0
|
index !== 0
|
||||||
? [
|
? [
|
||||||
@@ -27,7 +27,7 @@ const SymptomCell = ({
|
|||||||
{
|
{
|
||||||
height,
|
height,
|
||||||
width: CHART_COLUMN_WIDTH,
|
width: CHART_COLUMN_WIDTH,
|
||||||
backgroundColor: weekendBackgroundColor,
|
backgroundColor: backgroundColor,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
: [
|
: [
|
||||||
@@ -35,7 +35,7 @@ const SymptomCell = ({
|
|||||||
{
|
{
|
||||||
height,
|
height,
|
||||||
width: CHART_COLUMN_WIDTH,
|
width: CHART_COLUMN_WIDTH,
|
||||||
backgroundColor: weekendBackgroundColor,
|
backgroundColor: backgroundColor,
|
||||||
},
|
},
|
||||||
styles.topBorder,
|
styles.topBorder,
|
||||||
]
|
]
|
||||||
@@ -69,7 +69,6 @@ SymptomCell.propTypes = {
|
|||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
cell: {
|
cell: {
|
||||||
backgroundColor: 'white',
|
|
||||||
borderBottomColor: Colors.grey,
|
borderBottomColor: Colors.grey,
|
||||||
borderBottomWidth: CHART_GRID_LINE_HORIZONTAL_WIDTH,
|
borderBottomWidth: CHART_GRID_LINE_HORIZONTAL_WIDTH,
|
||||||
borderLeftColor: Colors.grey,
|
borderLeftColor: Colors.grey,
|
||||||
|
|||||||
@@ -19,12 +19,12 @@ const TemperatureColumn = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const x = CHART_STROKE_WIDTH / 2
|
const x = CHART_STROKE_WIDTH / 2
|
||||||
|
|
||||||
const weekendBackgroundColor = isWeekend ? Colors.greyVeryLight : 'white'
|
const backgroundColor = isWeekend ? Colors.greyVeryLight : 'white'
|
||||||
return (
|
return (
|
||||||
<Surface
|
<Surface
|
||||||
width={CHART_COLUMN_WIDTH}
|
width={CHART_COLUMN_WIDTH}
|
||||||
height={columnHeight}
|
height={columnHeight}
|
||||||
style={{ ...styles.container, backgroundColor: weekendBackgroundColor }}
|
style={{ backgroundColor: backgroundColor }}
|
||||||
>
|
>
|
||||||
<ChartLine path={new Path().lineTo(0, columnHeight)} />
|
<ChartLine path={new Path().lineTo(0, columnHeight)} />
|
||||||
|
|
||||||
@@ -69,10 +69,4 @@ TemperatureColumn.propTypes = {
|
|||||||
isWeekend: PropTypes.bool,
|
isWeekend: PropTypes.bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
container: {
|
|
||||||
backgroundColor: 'white',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
export default TemperatureColumn
|
export default TemperatureColumn
|
||||||
|
|||||||
Reference in New Issue
Block a user