Skip to content

Commit

Permalink
fix(xstyled): fix build error and remove Global Styles
Browse files Browse the repository at this point in the history
  • Loading branch information
wleklinskimateusz committed Jul 13, 2023
1 parent c66216e commit e8dcbf3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/tetrisly/TetrislyProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
import { Preflight, ThemeProvider } from "@xstyled/styled-components";
import { theme } from "../theme";
import { PropsWithChildren } from "react";
import { GlobalStyles } from "../GlobalStyles.styled";
import { Theme } from "@xstyled/styled-components";
import { TwoPartial } from "../utility-types/TwoPartial";
import { mergeObjects } from "../services/mergeObjects";

type ProviderProps = PropsWithChildren<{
theme?: TwoPartial<Theme>;
disableGlobalStyles?: boolean;
}>;

export const TetrislyProvider = ({
children,
theme: overrideTheme,
disableGlobalStyles = false,
}: ProviderProps) => {
const providerTheme =
overrideTheme === undefined ? theme : mergeObjects(theme, overrideTheme);
return (
<ThemeProvider theme={providerTheme}>
{!disableGlobalStyles && <GlobalStyles />}
<Preflight />
{children}
</ThemeProvider>
Expand Down

0 comments on commit e8dcbf3

Please sign in to comment.