Skip to content

Conversation

@jaulz
Copy link
Contributor

@jaulz jaulz commented Dec 9, 2021

This PR allows is a bit more complex but I think the changes will allow much more flexibility. Classes passed via props do not override the classes from variants by default anymore. If you pass undefined it will still clear the variant classes but for other values it will merge them. However, now you can also pass a function to the class object which allows you to manipulate the previous classes:
image

P.S.: the hasProperty function might lead to some type issues at the moment because it merges the object with Record<Y, unknown> and in case Y is a generic string it will basically extend all properties with & unknown.

@alfonsobries
Copy link
Contributor

@jaulz do you think you can remove the prettier stuff? its not like I am against it but I prefer further discussions since we already have eslint and I don't want to use different settings on the packages, in other words we can create separate PRs for that

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