Skip to main content

PaperProvider

PaperProvider(props): Element

Provider for a Paper. You can use this at some high level in your UI - some common parent component between the parent of where you want to put a Paper and where you want put other components that will need to reference it. Whenever a PaperComponent is declared as a descendant of this provider, the provider's underlying surface is set and this is propagated to all the other components using this context. To use this you just declare a PaperProvider element and put some children inside of it:

<PaperProvider>
<PaperComponent renderOptions={...}/>
<Palette/>
<div>
<MiniviewComponent/>
</div>
</PaperProvider>

Parameters

props

children?

ReactNode | ReactElement<any, any> | ReactNode | ReactElement<any, any>[]

Returns

Element