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 / global.styles.css
Last active June 23, 2020 03:32
Global Styles
*,
*::before,
*::after {
margin: 0;
padding: 0;
box-sizing: inherit;
}
html {
font-size: 62.5%; /* equivalent to 10px; 1rem = 10px; 10px/16px */
@niikkiin
niikkiin / helpers.styles.jsx
Created June 23, 2020 03:39
Current breakpoints
export const breakpoints = {
highResDesktop: '(min-width: 1281px)',
desktop: '(min-width: 1025px) and (max-width: 1280px)',
tabletLandscape: '(min-width: 961px) and (max-width: 1024px)',
tabletPortrait: '(min-width: 641px) and (max-width: 960px)',
phone: '(min-width: 320px) and (max-width: 640px)',
};
@niikkiin
niikkiin / dashboard.styles.jsx
Created June 24, 2020 07:37
Basic Dashboard Using styled-components
import styled from 'styled-components';
export const Container = styled.div`
display: grid;
grid-template-columns: 24rem 1fr;
grid-template-rows: 5rem 1fr 5rem;
grid-template-areas:
'sidebar header'
'sidebar main'
'sidebar footer';
@niikkiin
niikkiin / App.js
Created June 24, 2020 16:28
PrivateRoute setup in ReactJs
import React, { Suspense, useEffect } from 'react';
// routing
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import PrivateRoute from 'routing/private-route.routing';
// global styles
import { GlobalStyles } from 'utilities/styles/global.styles';
// redux
@niikkiin
niikkiin / sidebar.component.jsx
Created June 25, 2020 14:51
React Link on UL element
import React from 'react';
import { Container } from './sidebar.styles';
import { Route, Link } from 'react-router-dom'
export const Sidebar = () => {
return (
<Container>
<ul className='list'>
@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';
@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 / 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
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 / _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;