From 193f7aaf1fb2595a8d5eda284ecf4ba64edbbf26 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Thu, 16 Jan 2020 00:35:39 +0100 Subject: [PATCH] mobile menu --- assets/menu.svg | 1 - public/assets/menu.svg | 1 + screens/menu.tsx | 31 +++++++++++++++++++++++------- styles/content.styl | 2 +- styles/menu.styl | 43 ++++++++++++++++++++++++++++++++++++++++-- styles/utils.styl | 2 ++ 6 files changed, 69 insertions(+), 11 deletions(-) delete mode 100644 assets/menu.svg create mode 100644 public/assets/menu.svg diff --git a/assets/menu.svg b/assets/menu.svg deleted file mode 100644 index 1b005ed..0000000 --- a/assets/menu.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/menu.svg b/public/assets/menu.svg new file mode 100644 index 0000000..fc55c19 --- /dev/null +++ b/public/assets/menu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/screens/menu.tsx b/screens/menu.tsx index 08a5bbf..e9ac90d 100644 --- a/screens/menu.tsx +++ b/screens/menu.tsx @@ -1,17 +1,34 @@ -import React from 'react' +import React, { useState, useCallback } from 'react' import Link from '../components/link' import '../styles/menu.styl' +const HomeLink = () =>
+ +
fantus
+ +
+ const Menu: React.FC = () => { + + const [open, setOpen] = useState(false) + + const _close = useCallback(() => { + setOpen(false) + }, []) + + const _toggle = useCallback(() => { + setOpen(!open) + }, [open]) + return