microsoft / fluentui-contrib

Monorepo for contributor extension packages to Fluent UI
MIT License
31 stars 35 forks source link

Implement "insertion point" API for `react-shadow` #60

Closed spmonahan closed 8 months ago

spmonahan commented 10 months ago

Adds an "insertion point" API similar to Griffel's API.

Here we use a special sentinel ExtendedCSSStyleSheet in the adoptedStyleSheets array and look it up prior to setting the stylesheets.

~Additionally, a constant for whether adoptedStyleSheets is mutable is added so we can conditionally update the array. This improves Safari support. See this PR for more details.~

Resolves #59

spmonahan commented 9 months ago

As we discussed in offline, let's introduce a factory to create root, i.e.:

const root = createRoot({ sheetInsertionPoint: sheet })

@layershifter Made this update.

spmonahan commented 8 months ago

@layershifter I think I've addressed the changes we discussed. Can you remove your hold on the PR so it can be merged?

layershifter commented 8 months ago

@layershifter I think I've addressed the changes we discussed. Can you remove your hold on the PR so it can be merged?

@spmonahan I have already approved the PR previous week 🐱

image

@microsoft/fluentui-react-build can you please check the PR? 🙏