forked from layer5io/sistent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: coder12git <[email protected]>
- Loading branch information
1 parent
9606021
commit 230bdd0
Showing
10 changed files
with
120 additions
and
22 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,33 @@ | ||
import React from "react" | ||
import { ThemeToggler } from "gatsby-plugin-dark-mode" | ||
import Weather from '../../assets/images/Weather.svg'; | ||
import Search from '../../assets/images/Search.svg'; | ||
// import SearchDark from "../../assets/images/Search-dark.svg"; | ||
|
||
export default function ThemeToggle() { | ||
return ( | ||
<ThemeToggler> | ||
{({ theme, toggleTheme }) => ( | ||
<img | ||
src={theme === 'dark' ? Search : Weather } | ||
alt="Toggle Theme" | ||
onClick={() => toggleTheme(theme === 'dark' ? 'light' : 'dark')} | ||
/> | ||
|
||
)} | ||
</ThemeToggler> | ||
) | ||
} | ||
|
||
// export function SearchToggle(){ | ||
// return ( | ||
// <ThemeToggler> | ||
// {({ theme}) => ( | ||
// <img | ||
// src={theme === 'dark' ? SearchDark : Search } | ||
// alt="Toggle Search" | ||
// /> | ||
// )} | ||
// </ThemeToggler> | ||
// ) | ||
// } |
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