[REF-2878] Map fontFamily to fontFamily and --default-font-family (#3380)

When setting the font_family prop for a component, also set the radix token
`--default-font-family` so that child radix components will inherit the font.
This commit is contained in:
Masen Furer 2024-05-23 15:54:39 -07:00 committed by GitHub
parent d96f051486
commit 653f00b046
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,6 +47,8 @@ STYLE_PROP_SHORTHAND_MAPPING = {
"marginY": ("marginTop", "marginBottom"),
"bg": ("background",),
"bgColor": ("backgroundColor",),
# Radix components derive their font from this CSS var, not inherited from body or class.
"fontFamily": ("fontFamily", "--default-font-family"),
}