This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { AppProps } from 'next/app'; | |
import { ThemeProvider } from 'next-themes'; | |
import { useRouter } from 'next/router'; | |
import { useState, useEffect } from 'react'; | |
// styles | |
import 'tailwindcss/tailwind.css'; | |
import '@/styles/tailwind.css'; | |
import '@/styles/globals.scss'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { withRouter } from 'next/router'; | |
import Link from 'next/link'; | |
import React, { Children } from 'react'; | |
const ActiveLink = ({ router, children, ...props }) => { | |
const child = Children.only(children); | |
let className = child.props.className || ''; | |
if (router.pathname === props.href && props.activeClassName) { | |
className = `${className} ${props.activeClassName}`.trim(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
SECTION PLACEHOLDERS MIXINS | |
Usage: | |
input { | |
@include placeholder { | |
//STYLES here | |
} | |
} | |
Output | |
input::-webkit-input-placeholder { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Usage: | |
.element { | |
@include prefix(transform, rotate(42deg), webkit ms); | |
} | |
Output | |
.element { | |
-webkit-transform: rotate(42deg); | |
-ms-transform: rotate(42deg); | |
transform: rotate(42deg); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// keyframes mixin | |
@mixin keyframes($name) { | |
@-webkit-keyframes #{$name} { | |
@content; | |
} | |
@-moz-keyframes #{$name} { | |
@content; | |
} | |
@-ms-keyframes #{$name} { | |
@content; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// keyframes mixin | |
@mixin keyframes($name) { | |
@-webkit-keyframes #{$name} { | |
@content; | |
} | |
@-moz-keyframes #{$name} { | |
@content; | |
} | |
@-ms-keyframes #{$name} { | |
@content; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//App.js | |
import React from "react"; | |
import { BrowserRouter, Route, Switch } from "react-router-dom"; | |
import "./assets/main.css"; | |
import Home from "./pages/Home"; | |
import ThemeContext from "./utilities/ThemeContext"; | |
function App() { | |
return ( | |
<ThemeContext> | |
<BrowserRouter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
// router | |
import { BrowserRouter as Router, Switch } from "react-router-dom"; | |
// routes | |
import AuthRoute from "routes/AuthRoute"; | |
// pages | |
import Login from "pages/auth/Login"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
// import the global styles | |
import { GlobalStyles } from 'utilities/styles/global.styles'; | |
function App() { | |
return ( | |
<> | |
<GlobalStyles /> | |
Hello carrots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {useState} from 'react'; | |
// styled components | |
import { | |
} from './items.styles'; | |
// components | |
import { DashboardContainer } from 'components/dashboard-container/dashboard-container.component'; | |
import { Table } from 'components/table/table.component'; |
NewerOlder