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

Add custom label font size #152

Merged
merged 1 commit into from
Dec 7, 2023
Merged

Add custom label font size #152

merged 1 commit into from
Dec 7, 2023

Conversation

ghsteff
Copy link
Contributor

@ghsteff ghsteff commented Dec 7, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

You can't customize an edge labels font size

What is the new behavior?

You can customize an edge labels font size in the theme object

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Screenshot 2023-12-07 at 12 21 13 PM

Screenshot 2023-12-07 at 12 05 44 PM

Comment on lines -55 to +64
theme,
theme: {
...theme,
edge: {
...theme.edge,
label: {
...theme.edge.label,
fontSize: theme.edge.label.fontSize ?? 6
}
}
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made edge.label.fontSize optional in the theme object and then defaulted it to 6 like this

@amcdnl amcdnl merged commit f6fe814 into master Dec 7, 2023
1 check passed
@amcdnl amcdnl deleted the Add-custom-label-font-size branch December 7, 2023 20:25
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

Successfully merging this pull request may close these issues.

2 participants