-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DEV-026] Navbar #45
base: develop
Are you sure you want to change the base?
[DEV-026] Navbar #45
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -7,6 +7,7 @@ import { | |||||
Spacer, | ||||||
useColorMode, | ||||||
useColorModeValue, | ||||||
LightMode, | ||||||
} from "@chakra-ui/react"; | ||||||
import React from "react"; | ||||||
import { FaMoon, FaSun } from "react-icons/fa"; | ||||||
|
@@ -16,17 +17,22 @@ export const Navbar = (): JSX.Element => { | |||||
const SwitchIcon = useColorModeValue(FaMoon, FaSun); | ||||||
const nextMode = useColorModeValue("dark", "light"); | ||||||
|
||||||
const textColor = useColorModeValue("white", "white"); | ||||||
const boxBg = useColorModeValue("#343A40", "#343A40"); | ||||||
const buttonBg = useColorModeValue("#2D9CDB", "#2D9CDB"); | ||||||
const iconColor = useColorModeValue("#ECC94B", "light"); | ||||||
|
||||||
return ( | ||||||
<Flex w="100%" m="2" mb="4"> | ||||||
<Box m="2"> | ||||||
<Flex w="101%" mb="4" bg={boxBg} boxShadow="lg"> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: Since this component is used outside of the main landmark, we need to provide a semantic landmark HTML element as the wrapper rather than it being a div, can we convert this to use a nav?
Suggested change
For reference: https://www.w3.org/TR/wai-aria-practices/examples/landmarks/HTML5.html |
||||||
<Box m="4" color={textColor}> | ||||||
<Heading size="md">Dialog</Heading> | ||||||
</Box> | ||||||
<Spacer /> | ||||||
<Box> | ||||||
<Button m="1" size="sm"> | ||||||
<Box m="1"> | ||||||
<Button m="1" size="sm" bg={buttonBg} color={textColor}> | ||||||
Sign Up | ||||||
</Button> | ||||||
<Button m="1" size="sm"> | ||||||
<Button m="1" size="sm" bg={buttonBg} color={textColor}> | ||||||
Login | ||||||
</Button> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we i18n Sign up and Login? |
||||||
<IconButton | ||||||
|
@@ -37,7 +43,7 @@ export const Navbar = (): JSX.Element => { | |||||
color="current" | ||||||
margin="1" | ||||||
onClick={toggleColorMode} | ||||||
icon={<SwitchIcon />} | ||||||
icon={<SwitchIcon color={iconColor} />} | ||||||
/> | ||||||
</Box> | ||||||
</Flex> | ||||||
|
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.
Nice fix for this! we will probably need to implement a custom colorScheme so we can use the
LightMode
DarkMode
components properly, but that can be done on a later date