Skip to content

feat: component level theming#507

Draft
hcopp wants to merge 14 commits intomasterfrom
hunter/component-theming
Draft

feat: component level theming#507
hcopp wants to merge 14 commits intomasterfrom
hunter/component-theming

Conversation

@hcopp
Copy link
Contributor

@hcopp hcopp commented Mar 16, 2026

What changed? Why?

This PR introduces component theming.

  • Uses zustand for state, enabling support so that if someone updates config for Button, non Button props won't need to renrder
  • Supports function call, such as Button: (props) => ({ borderRadius: props?.compact ? 700 : 900 })
  • Uses props instead of BaseProps, since the function call would be passing in the exact props passed in from customers

Example:

<ComponentConfigProvider value={{ Button: { borderRadius: 100 } }}>
  <Button onClick={console.log}>Square</Button>
</ComponentConfigProvider>

Root cause (required for bugfixes)

UI changes

image

Testing

How has it been tested?

  • Unit tests
  • Interaction tests
  • Pseudo State tests
  • Manual - Web
  • Manual - Android (Emulator / Device)
  • Manual - iOS (Emulator / Device)

Testing instructions

Illustrations/Icons Checklist

Required if this PR changes files under packages/illustrations/** or packages/icons/**

  • verified visreg changes with Terran (include link to visreg run/approval)
  • all illustration/icons names have been reviewed by Dom and/or Terran

Change management

type=routine
risk=low
impact=sev5

automerge=false

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Mar 16, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 1
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1
CODEOWNERS 🟡 See below

🟡 CODEOWNERS

Code Owner Status Calculation
ui-systems-eng-team 🟡 0/1
Denominator calculation
Additional CODEOWNERS Requirement
Show calculation
Sum 0
0
From CODEOWNERS 1
Sum 1

* // }
* ```
*/
export function mergeComponentProps<
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brought merge logic over from #365

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants