-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Showing
9 changed files
with
242 additions
and
47 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
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,34 @@ | ||
import React from 'react'; | ||
import { | ||
Alignment, | ||
AnchorButton, | ||
Classes, | ||
Navbar, | ||
Switch, | ||
} from '@blueprintjs/core'; | ||
|
||
export default function NavPanel() { | ||
const darkThemeToggleStyles = { marginBottom: 0 }; | ||
|
||
const handleToggleDarkTheme = () => { | ||
document.body.classList.toggle(Classes.DARK); | ||
}; | ||
|
||
return ( | ||
<Navbar className={Classes.DARK}> | ||
<Navbar.Group align={Alignment.LEFT}> | ||
<Navbar.Heading>Deskreen</Navbar.Heading> | ||
</Navbar.Group> | ||
<Navbar.Group align={Alignment.RIGHT}> | ||
<AnchorButton href="#" text="Home" /> | ||
<Navbar.Divider /> | ||
<Navbar.Divider /> | ||
<Switch | ||
style={darkThemeToggleStyles} | ||
label="Dark theme" | ||
onChange={handleToggleDarkTheme} | ||
/> | ||
</Navbar.Group> | ||
</Navbar> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,6 +1,12 @@ | ||
import React from 'react'; | ||
import NavPanel from '../components/NavPanel'; | ||
import Counter from '../features/counter/Counter'; | ||
|
||
export default function CounterPage() { | ||
return <Counter />; | ||
return ( | ||
<> | ||
<NavPanel /> | ||
<Counter /> | ||
</> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,6 +1,12 @@ | ||
import React from 'react'; | ||
import NavPanel from '../components/NavPanel'; | ||
import Home from '../components/Home'; | ||
|
||
export default function HomePage() { | ||
return <Home />; | ||
return ( | ||
<> | ||
<NavPanel /> | ||
<Home /> | ||
</> | ||
); | ||
} |
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
Oops, something went wrong.