-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from hackdays-io/feature/prettier
Feature/prettier
- Loading branch information
Showing
28 changed files
with
425 additions
and
413 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"endOfLine": "lf", | ||
"semi": true, | ||
"singleQuote": false, | ||
"tabWidth": 2, | ||
"trailingComma": "es5" | ||
} |
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,32 +1,32 @@ | ||
import { Button, ButtonProps } from "~/components/ui/button"; | ||
|
||
interface CommonButtonProps extends Omit<ButtonProps, "width"> { | ||
children: React.ReactNode; | ||
width?: "full" | number; | ||
size?: "sm" | "md" | "lg"; | ||
backgroundColor?: string; | ||
color?: string; | ||
children: React.ReactNode; | ||
width?: "full" | number; | ||
size?: "sm" | "md" | "lg"; | ||
backgroundColor?: string; | ||
color?: string; | ||
} | ||
|
||
export const CommonButton = ({ | ||
children, | ||
width = "full", | ||
size = "md", | ||
backgroundColor, | ||
color, | ||
...props | ||
children, | ||
width = "full", | ||
size = "md", | ||
backgroundColor, | ||
color, | ||
...props | ||
}: CommonButtonProps) => { | ||
return ( | ||
<Button | ||
w={width === "full" ? "100%" : width} | ||
size={size} | ||
backgroundColor={backgroundColor} | ||
color={color} | ||
{...props} | ||
> | ||
{children} | ||
</Button> | ||
); | ||
return ( | ||
<Button | ||
w={width === "full" ? "100%" : width} | ||
size={size} | ||
backgroundColor={backgroundColor} | ||
color={color} | ||
{...props} | ||
> | ||
{children} | ||
</Button> | ||
); | ||
}; | ||
|
||
export default CommonButton; |
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,5 +1,5 @@ | ||
import { ChakraProvider as Provider, defaultSystem } from "@chakra-ui/react" | ||
import { ChakraProvider as Provider, defaultSystem } from "@chakra-ui/react"; | ||
|
||
export const ChakraProvider = (props: { children: React.ReactNode }) => { | ||
return <Provider value={defaultSystem} {...props} /> | ||
} | ||
return <Provider value={defaultSystem} {...props} />; | ||
}; |
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,15 +1,15 @@ | ||
import { IconButton } from "@chakra-ui/react" | ||
import { Moon, Sun } from "lucide-react" | ||
import { useTheme } from "next-themes" | ||
import { IconButton } from "@chakra-ui/react"; | ||
import { Moon, Sun } from "lucide-react"; | ||
import { useTheme } from "next-themes"; | ||
|
||
export function ColorModeToggle() { | ||
const { theme, setTheme } = useTheme() | ||
const { theme, setTheme } = useTheme(); | ||
const toggleColorMode = () => { | ||
setTheme(theme === "light" ? "dark" : "light") | ||
} | ||
setTheme(theme === "light" ? "dark" : "light"); | ||
}; | ||
return ( | ||
<IconButton aria-label="toggle color mode" onClick={toggleColorMode}> | ||
{theme === "light" ? <Moon /> : <Sun />} | ||
</IconButton> | ||
) | ||
); | ||
} |
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
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.