This file contains hidden or 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 { createSelector } from "reselect"; |
This file contains hidden or 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
const initialState = { | |
data: [ | |
{ | |
name: "Milton", | |
type: "cat", | |
age: 4 | |
}, | |
{ | |
name: "Sammy", | |
type: "dog", |
This file contains hidden or 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
div.demo { | |
display: inline-block; | |
width: 110px; | |
height: 110px; | |
margin: 10px; | |
--aug-border: 5px; | |
--aug-inset: 5px; | |
padding: 10px; /* mind the gap */ | |
text-align: center; | |
--aug-border-bg: gold; |
This file contains hidden or 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
.header--fixed { | |
position: absolute; | |
top: 0; | |
width: 100%; | |
} | |
.header--fixed.top { | |
transition: none; | |
transform: translateY(0); | |
} | |
.header--fixed.not-top { |
This file contains hidden or 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 "./styles.css"; | |
// first import. | |
import Headroom from "headroom.js"; | |
// grab the header element. | |
const Header = document.querySelector("header"); | |
// construct an instance of Headroom, passing the header elemen. | |
const headroom = new Headroom(Header, { |
This file contains hidden or 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 "./styles.css"; | |
// first import. | |
import Headroom from "headroom.js"; | |
// grab the header element. | |
const Header = document.querySelector("header"); | |
// construct an instance of Headroom, passing the header elemen. | |
const headroom = new Headroom(Header, { |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Sticky Nav</title> | |
<meta charset="UTF-8" /> | |
</head> | |
<body> | |
<div id="app"></div> | |
<header class="headroom headroom--pinned headroom--unpinned">header</header> |
This file contains hidden or 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 { Logo, ProfileImage, BurgerMenu, HeaderWrapper } from 'components'; | |
const Header = () => ( | |
<HeaderWrapper> | |
<Logo></Logo> | |
<ProfileImage></ProfileImage> | |
<BurgerMenu></BurgerMenu> | |
</HeaderWrapper> | |
) |
This file contains hidden or 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'; | |
const Header = () => ( | |
<Header> | |
<Logo></Logo> | |
<ProfileImage></ProfileImage> | |
<BurgerMenu></BurgerMenu> | |
</Header> | |
) |