Skip to content

Instantly share code, notes, and snippets.

View Brlaney's full-sized avatar

Brendan Laney Brlaney

  • TN, United States
View GitHub Profile
@Brlaney
Brlaney / themes.scss
Created July 21, 2021 00:08
Custom palette/theme in scss file
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap');
$c-primary: '#246EB9';
$c-secondary: '#16ff4c';
$c-error: '#F06543';
$c-warning: '#F5EE9E';
$c-info: '#16c9ff';
$c-bg: '#FDFFFC';
$white: #fff;
$black: #000000;
@Brlaney
Brlaney / theme.ts
Last active September 23, 2022 09:46
My custom Material-UI theme
import {
createTheme,
responsiveFontSizes
} from '@mui/material/styles';
const font = "'Rubik', sans-serif";
let theme = createTheme({
palette: {
primary: { main: '#1d2031' },
@Brlaney
Brlaney / _document.tsx
Created July 21, 2021 00:05
My _document.tsx file for using Material-UI with Next.js
import * as React from 'react'
import Document, { Html, Head, Main, NextScript } from 'next/document'
import createEmotionServer from '@emotion/server/create-instance'
import createCache from '@emotion/cache'
import { CacheProvider } from '@emotion/react'
function getCache() {
const cache = createCache({ key: 'css', prepend: true })
cache.compat = true
return cache
@Brlaney
Brlaney / _app.tsx
Created July 21, 2021 00:04
My _app.tsx file for using Material-UI with Next.js
import * as React from 'react'
import type { AppProps } from 'next/app'
import Head from 'next/head'
import { useRouter } from 'next/router'
import { ThemeProvider } from '@material-ui/core/styles'
import { CacheProvider } from '@emotion/react'
import CssBaseline from '@material-ui/core/CssBaseline'
import createCache from '@emotion/cache'
import theme from '@/lib/mui-theme/theme'
import '@/styles/globals.scss'
@Brlaney
Brlaney / tsconfig.json
Last active July 21, 2021 00:06
tsconfig.json
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/styles/*": ["./src/styles/*"],
"@/lib/*": ["./src/lib/*"]
},
"target": "esnext",
"lib": [
"dom",