Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style the time in TimeMarker #474

Open
shyam-asl opened this issue May 15, 2021 · 0 comments
Open

Style the time in TimeMarker #474

shyam-asl opened this issue May 15, 2021 · 0 comments

Comments

@shyam-asl
Copy link

🌈Feature request

What is this feature?
Ability to style the time string in the TimeMarker.

How should the feature work?
Just like the line and the info box and its labels, the time string should also be allowed to be styled to maintain a consistent styling.

Do you have examples or an idea of how it can be implemented?
We can pass the style as an embedded object within infoStyle props, just like the others. In src/components/TimeMarker.js, we can pass an infoStyle.time style object:

    renderTimeMarker(d) {
        const textStyle = {
            fontSize: 11,
            textAnchor: "left",
            fill: "#bdbdbd",
            ...this.props.infoStyle.time // <-- new embedded prop
        };

Additional context
The suggested style using infoStyle.time is based on the following styles used in TimeMarker:

  • infoStyle.line
  • infoStyle.box
  • infoStyle.label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant