Open v-honcharenko opened 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
dripsy | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 16, 2023 1:11am |
Hey, you can use the aliases
field on the theme
to inject your own aliases too. Would that suffice to solve this?
@nandorojo the issue is related only to typings of built-in aliases. All of these aliases are valid in JS code, and even in TS code it will work, BUT, TypeScript will complain on it, because these types are missed (only types, not aliases). This PR fixes that.
Hi @nandorojo
First of all, thank you for your work on this great project!
I found a typing issue with the
Sx
prop related to aliases. For now, only the aliases of theme-ui are allowed by TS (bg
,m
,mt
,mr
,mb
,ml
,mx
,my
,p
,pt
,pr
,pb
,pl
,px
,py
,size
), all other defined aliases (likeh
,w
,br
) are not exposed toSx
type, and TS will complain when you will try to use it, however aliasing will work.This PR fixes this issue, allowing to use TS intellisense for predefined aliases.