Skip to content

GlobalProps inheritance #541

@mbohal

Description

@mbohal

Presently the GlobalProps mechanism does not allow overloading of only specific props. The entire object gets overloaded and thus it is near to impossible to use it to modify GlobalProps only for certain parts of the app.

**Minimal Example: **

<RUIProvider
  globalProps={{
    TextField: { layout: 'horizontal' },
  }}
>
  <RUIProvider
    globalProps={{
      TextField: { size: 'small' },
    }}
  >
    <TextField label="username" />
  </RUIProvider>
</RUIProvider>

Expected GlobalProps: layout=horizontal, size=small
Received GlobalProps: size=small

Metadata

Metadata

Labels

documentationImprovements or additions to documentationfeature

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions