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

fix: make fontSize optional #542

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TheAlexLichter
Copy link

According to the docs, fontSize is an optional property. This should be reflected in the types as well.

Copy link

github-actions bot commented Mar 20, 2025

CLA Assistant Lite bot ✅ All required contributors have signed the F5 CLA for this PR. Thank you!

@TheAlexLichter
Copy link
Author

I have hereby read the F5 CLA and agree to its terms

@lee00678
Copy link
Collaborator

@TheAlexLichter thanks for the fix!

@rokotyan
Copy link
Contributor

@TheAlexLichter (@lee00678)

I'm not confident that this property is optional, how did you come to your conclusion?

Looking at the getWrappedText function, the fontSize property doesn't seem to be optional
image

@lee00678
Copy link
Collaborator

lee00678 commented Mar 21, 2025

@TheAlexLichter (@lee00678)

I'm not confident that this property is optional, how did you come to your conclusion?

Looking at the getWrappedText function, the fontSize property doesn't seem to be optional.

I haven't got a chance to review this PR. But I'm also open to make it an optional property.

@TheAlexLichter
Copy link
Author

TheAlexLichter commented Mar 21, 2025

@rokotyan Given this example in the docs (and others) not adding explicit fontSize values.

### Styled Text
To customize font or color of your text, provide `content` with an object of type `UnovisText`.
In this case, you put the desired string content to the `text` property,
and additional properties can be set.
```ts
items = [{
content: { text: 'Item 2', color: 'red' }
}]
```
<XYWrapper {...annotationsProps()} excludeTabs showAxes items={[
{ content: { text: 'Item 2', color: 'red' } }
]}/>

And that there are defaults in

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.

3 participants