Skip to content

Instantly share code, notes, and snippets.

View niikkiin's full-sized avatar
👀
Going above and beyond

Nikki Abarca niikkiin

👀
Going above and beyond
View GitHub Profile
@niikkiin
niikkiin / _app.tsx
Created November 26, 2021 10:13
Implement loading screen on Nextjs
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';
@niikkiin
niikkiin / ActiveLink.js
Created April 28, 2021 16:50 — forked from remy/ActiveLink.js
Next.js version of `activeClassName` support.
@niikkiin
niikkiin / _mixins.scss
Created March 7, 2021 02:27
Placeholder mixins
/*
SECTION PLACEHOLDERS MIXINS
Usage:
input {
@include placeholder {
//STYLES here
}
}
Output
input::-webkit-input-placeholder {
@niikkiin
niikkiin / _mixins.scss
Last active March 7, 2021 02:28
Autoprefixer
/* Usage:
.element {
@include prefix(transform, rotate(42deg), webkit ms);
}
Output
.element {
-webkit-transform: rotate(42deg);
-ms-transform: rotate(42deg);
transform: rotate(42deg);
@niikkiin
niikkiin / _mixins.scss
Created February 17, 2021 15:38
SCSS MIXINS FOR ANIMATIONS
// keyframes mixin
@mixin keyframes($name) {
@-webkit-keyframes #{$name} {
@content;
}
@-moz-keyframes #{$name} {
@content;
}
@-ms-keyframes #{$name} {
@content;
@niikkiin
niikkiin / _mixins.scss
Created February 17, 2021 15:38
SCSS MIXINS FOR ANIMATIONS
// keyframes mixin
@mixin keyframes($name) {
@-webkit-keyframes #{$name} {
@content;
}
@-moz-keyframes #{$name} {
@content;
}
@-ms-keyframes #{$name} {
@content;
@niikkiin
niikkiin / App.js
Last active October 22, 2020 16:03
Creating Theming on React using Tailwind
//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>
@niikkiin
niikkiin / App.js
Created September 2, 2020 19:46
React App Set Up with Layout for Router
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";
@niikkiin
niikkiin / App.js
Created July 20, 2020 15:59
For creating global styles with reset using styled-components
import React from 'react';
// import the global styles
import { GlobalStyles } from 'utilities/styles/global.styles';
function App() {
return (
<>
<GlobalStyles />
Hello carrots
@niikkiin
niikkiin / component-using-the-table.component.jsx
Created June 25, 2020 15:13
Responsive Table in Styled Components
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';