mirror of
https://github.com/stonith404/pingvin-share.git
synced 2025-02-19 01:55:48 -05:00
Adapt css styles for Mantine
This commit is contained in:
parent
464406603a
commit
5f7e959a9c
5 changed files with 19 additions and 19 deletions
|
@ -6,7 +6,7 @@ import {
|
||||||
import { ModalsProvider } from "@mantine/modals";
|
import { ModalsProvider } from "@mantine/modals";
|
||||||
import { setCookies } from "cookies-next";
|
import { setCookies } from "cookies-next";
|
||||||
import { Dispatch, ReactNode, SetStateAction } from "react";
|
import { Dispatch, ReactNode, SetStateAction } from "react";
|
||||||
import mantineTheme from "../../styles/global.style";
|
import mantineTheme from "../../styles/mantine.style";
|
||||||
|
|
||||||
const ThemeProvider = ({
|
const ThemeProvider = ({
|
||||||
children,
|
children,
|
||||||
|
|
|
@ -11,11 +11,11 @@ import { getCookie } from "cookies-next";
|
||||||
import { GetServerSidePropsContext } from "next";
|
import { GetServerSidePropsContext } from "next";
|
||||||
import type { AppProps } from "next/app";
|
import type { AppProps } from "next/app";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import "../../styles/globals.css";
|
|
||||||
import Footer from "../components/Footer";
|
import Footer from "../components/Footer";
|
||||||
import ThemeProvider from "../components/mantine/ThemeProvider";
|
import ThemeProvider from "../components/mantine/ThemeProvider";
|
||||||
import Header from "../components/navBar/NavBar";
|
import Header from "../components/navBar/NavBar";
|
||||||
import globalStyle from "../styles/global.style";
|
import GlobalStyle from "../styles/global.style";
|
||||||
|
import globalStyle from "../styles/mantine.style";
|
||||||
import aw from "../utils/appwrite.util";
|
import aw from "../utils/appwrite.util";
|
||||||
import authUtil, { IsSignedInContext } from "../utils/auth.util";
|
import authUtil, { IsSignedInContext } from "../utils/auth.util";
|
||||||
import configUtil, { ConfigContext } from "../utils/config.util";
|
import configUtil, { ConfigContext } from "../utils/config.util";
|
||||||
|
@ -49,6 +49,7 @@ function App(
|
||||||
return (
|
return (
|
||||||
<MantineProvider withGlobalStyles withNormalizeCSS theme={globalStyle}>
|
<MantineProvider withGlobalStyles withNormalizeCSS theme={globalStyle}>
|
||||||
<ThemeProvider colorScheme={colorScheme} setColorScheme={setColorScheme}>
|
<ThemeProvider colorScheme={colorScheme} setColorScheme={setColorScheme}>
|
||||||
|
<GlobalStyle />
|
||||||
<NotificationsProvider>
|
<NotificationsProvider>
|
||||||
<ModalsProvider>
|
<ModalsProvider>
|
||||||
<GlobalLoadingContext.Provider value={{ isLoading, setIsLoading }}>
|
<GlobalLoadingContext.Provider value={{ isLoading, setIsLoading }}>
|
||||||
|
|
15
src/styles/global.style.tsx
Normal file
15
src/styles/global.style.tsx
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
import { Global } from "@mantine/core";
|
||||||
|
|
||||||
|
const GlobalStyle = () => {
|
||||||
|
return (
|
||||||
|
<Global
|
||||||
|
styles={(theme) => ({
|
||||||
|
a: {
|
||||||
|
color: "inherit",
|
||||||
|
textDecoration: "none",
|
||||||
|
},
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export default GlobalStyle;
|
|
@ -1,16 +0,0 @@
|
||||||
html,
|
|
||||||
body {
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
|
|
||||||
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: inherit;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue