You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/emotion/src/getTheme.ts
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -37,15 +37,17 @@ import type {
37
37
* ---
38
38
* private: true
39
39
* ---
40
-
* Gives back the theme object for the the provider.
40
+
* Gives back the theme object for the provider.
41
41
*
42
42
* If a valid InstUI theme is given, it just returns the theme.
43
43
*
44
44
* If an override object is given, it returns the ancestor theme and
45
45
* the overrides merged together.
46
46
*
47
-
* @param {object} themeOrOverride - A full theme or an override object
48
-
* @returns {function} A function that returns with the theme object for the [ThemeProvider](https://emotion.sh/docs/theming#themeprovider-reactcomponenttype)
47
+
* @param themeOrOverride - A full theme or an override object
48
+
* @returns A function that returns with the theme object for the [ThemeProvider](https://emotion.sh/docs/theming#themeprovider-reactcomponenttype)
49
+
* This function is called by Emotion on theme provider creation, where
50
+
* `ancestorTheme` is a theme object from an ancestor `ThemeProvider`
49
51
*/
50
52
constgetTheme=
51
53
(themeOrOverride: ThemeOrOverride)=>
@@ -71,7 +73,6 @@ const getTheme =
71
73
72
74
// we need to clone the ancestor theme not to override it
0 commit comments