content-ui-inject
v0.0.5
Published
Boost content-ui injection for better extension developer experience.
Downloads
3
Maintainers
Readme
content-ui-inject
Boost content-ui injection for better extension developer experience.
Quick start
- Inject shadowRoot to content-ui
import { createShadowRootUI } from 'content-ui-injector'
const app = await createShadowRootUI({
name: 'react-boilerplate',
position: 'inline',
injectAnchor: 'body',
injectMode: 'before',
styleOptions: {
textContent: tailwindcssOutput,
},
onCustomize: (uiContainer, shadowHost) => {
shadowHost.style.zIndex = '9999'
shadowHost.id = 'xxx'
},
onMount: (uiContainer) => {
createRoot(uiContainer).render(<App />)
},
})
app.mount()
License
MIT License © 2023-PRESENT leizhenpeng