From 670c7265aa41a23f220bd0a9c938d5f7e6a7f8e2 Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Mon, 22 Jun 2020 22:48:42 -0700 Subject: [PATCH] feat: Add dark mode toggle to the header --- src/components/FeatherIcon.js | 3 ++- src/components/GlobalHeader.js | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/FeatherIcon.js b/src/components/FeatherIcon.js index 273fed943..6ad6cae82 100644 --- a/src/components/FeatherIcon.js +++ b/src/components/FeatherIcon.js @@ -3,11 +3,12 @@ import PropTypes from 'prop-types'; import cx from 'classnames'; import styles from './FeatherIcon.module.scss'; -const FeatherIcon = ({ className, name, size = '1em' }) => { +const FeatherIcon = ({ className, name, size = '1em', ...props }) => { const paths = ICONS[name]; return paths ? ( { const { fileRelativePath } = useContext(PageContext); + const darkMode = useDarkMode(false); return (
@@ -58,6 +60,13 @@ const GlobalHeader = ({ className }) => {