@monolith-forensics/monolith-ui 1.2.99 → 1.2.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DefaultTheme } from "styled-components";
|
|
2
|
-
export { styled,
|
|
2
|
+
export { styled, createGlobalStyle, css } from "styled-components";
|
|
3
3
|
import { Themes } from "../theme";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import typography from "../theme/typography";
|
|
@@ -142,3 +142,4 @@ interface MonolithUIProviderProps {
|
|
|
142
142
|
colorScheme?: Themes;
|
|
143
143
|
}
|
|
144
144
|
export declare const MonolithUIProvider: ({ children, theme, defaultColorScheme, colorScheme, }: MonolithUIProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
145
|
+
export declare const useTheme: () => MonolithDefaultTheme;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import merge from "deepmerge";
|
|
3
|
-
import { ThemeProvider } from "styled-components";
|
|
4
|
-
export { styled,
|
|
3
|
+
import { ThemeProvider, useTheme as useStyledTheme, } from "styled-components";
|
|
4
|
+
export { styled, createGlobalStyle, css } from "styled-components";
|
|
5
5
|
import { Themes, getTheme } from "../theme";
|
|
6
6
|
import { createContext, useEffect, useState } from "react";
|
|
7
7
|
import GlobalStyle from "./GlobalStyle";
|
|
@@ -28,3 +28,7 @@ export const MonolithUIProvider = ({ children, theme, defaultColorScheme = local
|
|
|
28
28
|
setColorScheme: setColorSchemeState,
|
|
29
29
|
}, children: _jsxs(ThemeProvider, { theme: _theme, children: [_jsx(GlobalStyle, { theme: _theme }), children] }) }));
|
|
30
30
|
};
|
|
31
|
+
// Custom typed useTheme hook
|
|
32
|
+
export const useTheme = () => {
|
|
33
|
+
return useStyledTheme();
|
|
34
|
+
};
|