Skip to content

feat(react-cap-theme): add CAP component wrappers and separate from published customStyleHooks#637

Draft
GianoglioEnrico wants to merge 14 commits into
microsoft:mainfrom
GianoglioEnrico:egianoglio/react-cap-theme-components-def
Draft

feat(react-cap-theme): add CAP component wrappers and separate from published customStyleHooks#637
GianoglioEnrico wants to merge 14 commits into
microsoft:mainfrom
GianoglioEnrico:egianoglio/react-cap-theme-components-def

Conversation

@GianoglioEnrico
Copy link
Copy Markdown
Contributor

@GianoglioEnrico GianoglioEnrico commented Apr 16, 2026

Overview

This PR proposes a restructuring of the react-cap-theme package to clearly separate the published style hooks (src/customStyleHooks/) from internal-only component wrappers (src/components/).

Some Fluent UI components require API changes (e.g. new appearances, additional props) that cannot be achieved through customStyleHooks_unstable alone. These components need full wrappers that compose custom state, styles, and rendering.

The package continues to export only the custom style hooks as its public API, but defining full component wrappers allows us to test the final CAP components end-to-end.

Component architecture

The internal components are built by calling the base Fluent style hooks first and then applying the CAP overrides on top, making them self-contained — they don't depend on customStyleHooks_unstable being injected via FluentProvider. This means they can also be reused in applications where, for technical reasons, it is not possible to use the FluentProvider injection mechanism.

cc: @dvdzkwsk

@GianoglioEnrico GianoglioEnrico changed the title move CAP component wrappers into components folder and separate from … feat(react-cap-theme): add CAP component wrappers and separate from published customStyleHooks Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant