gympass/yoga

[BUG] Fix prop size to Text component

oharaju opened this issue ยท 3 comments

Hey Guys!

Using Yoga in my personal project, I noticed a problem regarding the <Text> component.

In the documentation of the Text props I verified that to change the font-size it is necessary to use the size, however when declaring it I verified that the prop does not work very well.
image

The Text component has compatibility with the Yoga System as described in the documentation "Text component also has support for system props as you can see here", this means that, using the typography resources, it enters into duplicity with regard to the properties to change the font-size.

Props:
size - only available in the component;
fontSize - available on the Yoga System.

When testing using fontSize instead of size it worked perfectly, below is evidence:
image

Conclusion:

The size property has been deprecated by Yoga System (typography), properties but the documentation has not been updated. Just as the variant prop is deprecated by color, the size prop should also be deprecated by fontSize.

Proposal:

  • Update of usage examples;
  • Add the prop size as deprecated (example variant);
    image
  • Change in properties documentation.
    image

Hey, @oharaju! How are you?
Firstly, congratulations on opening your first issue on Yoga! It's very good to know that you are using our design system in your personal projects and actively contributing with the project.

Since you already came with a solution, are you interested in working on this issue?

Cheers,
Caio.

Hi @caiotracera! I'm fine and you?

Yes, I'm interested. I will make the changes and soon I will open the pull request.

@oharaju everything is fine ๐Ÿ˜

Okay, so we will be waiting for your pull request. But don't need to rush, the next deploy will probably occur only next week.
Feel free to reach us if you need any help!