Conception of API with more modifiers and environments variables #1164
pylapp
started this conversation in
Ideas, studies
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Context
Today, we define our components following the Figma specifications and do our best to be aligned with the notions of design assets.
For example, for a
checkboxcomponent (v0.21.0 of the lib), its init is a bit verbose:Using the init is interesting here for several uses:
However this way to do, even efficient, is a bit verbose, not enough reactive / swifty.
We can imagine to use specific view modifiers for the component which will, for example ad a specific value as environment variable. View modifiers, styles or environment methods can be used.
For example:
Solution
Check if the two approaches can be used in the same time.
Otherwise see which one is the best for the users and keep in mind the tests and the documentation.
Beta Was this translation helpful? Give feedback.
All reactions