Closed jaivinwylde closed 1 year ago
It's certainly possible, and could be added in the next version. Currently, Dripsy uses the alias
variable I believe to define shorthands. So we'd need a way to pass that to the theme. Next, since our types currently read this alias variable statically, we'd need to merge that value with the one passed to our theme. Finally, we'd need to consume the user's shorthands in the actual dripsy hook by merging it with alias, which again, should be straightforward.
The only issue is that the Dripsy internals are a bit of a mess but I do think this is a good idea.
What do you think about adding tamagui's shorthands to the alias variable in the meantime? They have a lot of sane defaults that cover almost all of the styles that people often use.
if you point me to the file i can do that
but ideally i’d accept a PR
on it
I added tamagui's shorthands, but I think it makes sense to keep this issue open since the custom shorthands feature hasn't been added yet
This will be much easier to add with the upcoming release of v4, which has much cleaner types.
theme.aliases
implemented in v4.
Are there any plans to allow for defining custom shorthands (aliases)?
What would need to be added to get this to work? I'm not familiar with the codebase, but I could try making a PR.