MCPcopy Index your code
hub / github.com/adobe/react-spectrum / ProviderInner

Function ProviderInner

packages/@react-spectrum/s2/src/Provider.tsx:111–134  ·  view source on GitHub ↗
(props: ProviderProps)

Source from the content-addressed store, hash-verified

109});
110
111function ProviderInner(props: ProviderProps) {
112 let {
113 elementType: Element = 'div',
114 UNSAFE_style,
115 UNSAFE_className = '',
116 styles,
117 children,
118 // Set a default background if the provider is rendered as the root <html> element.
119 background = Element === 'html' ? 'base' : undefined,
120 colorScheme
121 } = props;
122 let {locale, direction} = useLocale();
123 return (
124 <Element
125 {...filterDOMProps(props)}
126 lang={locale}
127 dir={direction}
128 style={UNSAFE_style}
129 className={UNSAFE_className + mergeStyles(styles, providerStyles({background, colorScheme}))}>
130 <Fonts />
131 {children}
132 </Element>
133 );
134}

Callers

nothing calls this directly

Calls 3

useLocaleFunction · 0.90
filterDOMPropsFunction · 0.90
mergeStylesFunction · 0.90

Tested by

no test coverage detected