esnet / esnet/react-timeseries-charts

Box styling on TimeMarker doesn't work

Open
#405 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
876
Forks
279
PR merge metrics
No merged PRs in 30d

Description

# 🐛Bug report

Styling the box using `infoStyles = {..., box: ...}` does not do anything on a `TimeMarker` component.

I believe that this is because:

line 73 of TimeMarker.js unpacks the box property
`style: this.props.infoStyle.box,`

then renders a label component which attempts to again unpack the box property style.box

```
function mergeStyles(style, isCentered) {
return {
boxStyle: merge(true, defaultBoxStyle, style.box ? style.box : {}),
labelStyle: merge(
true,
isCentered ? defaultTextStyleCentered : defaultTextStyle,
style.label ? style.label : {}
)
};
}
```

(to anyone needing a workaround, use: `infoStyles = {..., box: { box: {...} }}`)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.