-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8207ea4
commit 4b42537
Showing
7 changed files
with
312 additions
and
106 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
import React from "react" | ||
import { Link as GatsbyLink, withPrefix } from "gatsby" | ||
import { | ||
Drawer, | ||
DrawerBody, | ||
DrawerHeader, | ||
DrawerOverlay, | ||
DrawerContent, | ||
DrawerCloseButton, | ||
Stack, | ||
Button, | ||
} from "@chakra-ui/core" | ||
|
||
const NavLink = ({ to, location, ...props }) => ( | ||
<Button | ||
as={GatsbyLink} | ||
width="100%" | ||
variant="ghost" | ||
variantColor="purple" | ||
borderRadius={20} | ||
to={to} | ||
isActive={location.pathname === withPrefix(to)} | ||
{...props} | ||
/> | ||
) | ||
|
||
const EffectsDrawer = ({ isOpen, onClose, drawerButtonRef, location }) => { | ||
return ( | ||
<Drawer | ||
isOpen={isOpen} | ||
placement="left" | ||
onClose={onClose} | ||
finalFocusRef={drawerButtonRef} | ||
> | ||
<DrawerOverlay /> | ||
<DrawerContent> | ||
<DrawerCloseButton /> | ||
<DrawerHeader>Effects</DrawerHeader> | ||
<DrawerBody overflowY="auto" pb={4}> | ||
<Stack as="nav" shouldWrapChildren spacing={4}> | ||
<NavLink to="/bounce" location={location}> | ||
Bounce | ||
</NavLink> | ||
<NavLink to="/fade" location={location}> | ||
Fade | ||
</NavLink> | ||
<NavLink to="/flash" location={location}> | ||
Flash | ||
</NavLink> | ||
<NavLink to="/flip" location={location}> | ||
Flip | ||
</NavLink> | ||
<NavLink to="/headshake" location={location}> | ||
Head Shake | ||
</NavLink> | ||
<NavLink to="/heartbeat" location={location}> | ||
Heart Beat | ||
</NavLink> | ||
<NavLink to="/jackinthebox" location={location}> | ||
Jack In The Box | ||
</NavLink> | ||
<NavLink to="/jello" location={location}> | ||
Jello | ||
</NavLink> | ||
<NavLink to="/lightspeed" location={location}> | ||
Light Speed | ||
</NavLink> | ||
<NavLink to="/pulse" location={location}> | ||
Pulse | ||
</NavLink> | ||
<NavLink to="/rotate" location={location}> | ||
Rotate | ||
</NavLink> | ||
<NavLink to="/rubberband" location={location}> | ||
Rubber Band | ||
</NavLink> | ||
<NavLink to="/shake" location={location}> | ||
Shake | ||
</NavLink> | ||
<NavLink to="/slide" location={location}> | ||
Slide | ||
</NavLink> | ||
<NavLink to="/swing" location={location}> | ||
Swing | ||
</NavLink> | ||
<NavLink to="/tada" location={location}> | ||
Tada | ||
</NavLink> | ||
<NavLink to="/wobble" location={location}> | ||
Wobble | ||
</NavLink> | ||
<NavLink to="/zoom" location={location}> | ||
Zoom | ||
</NavLink> | ||
</Stack> | ||
</DrawerBody> | ||
</DrawerContent> | ||
</Drawer> | ||
) | ||
} | ||
|
||
export default EffectsDrawer |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from "react" | ||
import { Flex } from "@chakra-ui/core" | ||
|
||
const Section = ({ children, hasNavbar = true }) => ( | ||
<Flex | ||
as="section" | ||
minH={hasNavbar ? "calc(100vh - 4rem)" : "100vh"} | ||
align="center" | ||
justify="center" | ||
direction="column" | ||
pb={hasNavbar ? 16 : 0} | ||
> | ||
{children} | ||
</Flex> | ||
) | ||
|
||
export default Section |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from "react" | ||
import { Grid } from "@chakra-ui/core" | ||
|
||
// Components | ||
import Card from "../components/card" | ||
import Layout from "../components/layout" | ||
|
||
export default ({ location }) => ( | ||
<Layout location={location} title="Fade"> | ||
<Grid | ||
templateColumns={[ | ||
"repeat(1, 1fr)", | ||
"repeat(2, 1fr)", | ||
"repeat(3, 1fr)", | ||
"repeat(4, 1fr)", | ||
]} | ||
gap={8} | ||
my={8} | ||
> | ||
{Array.from({ length: 120 }).map((_, index) => ( | ||
<Card key={index} /> | ||
))} | ||
</Grid> | ||
</Layout> | ||
) |
Oops, something went wrong.
4b42537
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: