You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(theme)!: type PaperProvider's theme prop to match its shallow merge #5165
PaperProvider merges its theme prop shallowly: each top-level key replaces the default, and only colors merges one level deep over the base scheme. Its type doesn't say so. The prop is typed as ThemeProp, a deep partial of the theme (src/theme/types/theme.ts), so a partial fonts object type-checks and then makes Text throw at runtime (#4589).
Proposal
Give PaperProvider its own theme type that matches the merge: colors accepts a partial, and every other top-level key must be complete when given. Components keep the deep partial for their own theme prop, since safeMerge deep-merges it. ThemeProp stays unexported.
This changes a public type, so it lands before 6.0.0-beta.0, with a migration guide entry and the theming guide saying that a key such as fonts must be complete.
Closing this one. PaperProvider now merges its theme prop deeply (#5234), so the deep-partial type the prop already has matches what it does: a partial fonts or motion object is merged over the defaults instead of replacing them. The theming and migration guides now say to pass only the keys you change.
Activity
Doberjohn commentedon Nov 18, 2026
Closing this one. PaperProvider now merges its theme prop deeply (#5234), so the deep-partial type the prop already has matches what it does: a partial fonts or motion object is merged over the defaults instead of replacing them. The theming and migration guides now say to pass only the keys you change.