-
Notifications
You must be signed in to change notification settings - Fork 4
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
28 changed files
with
406 additions
and
409 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 |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
"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,13 +1,13 @@ | ||
import { | ||
Input as ChakraInput, | ||
InputProps as ChakraInputProps, | ||
Input as ChakraInput, | ||
InputProps as ChakraInputProps, | ||
} from "@chakra-ui/react"; | ||
|
||
interface InputProps extends Omit<ChakraInputProps, "value"> { | ||
value: string | number; | ||
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void; | ||
value: string | number; | ||
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void; | ||
} | ||
|
||
export const Input = ({ value, onChange }: InputProps) => { | ||
return <ChakraInput value={value} onChange={onChange} />; | ||
return <ChakraInput value={value} onChange={onChange} />; | ||
}; |
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,13 +1,13 @@ | ||
import { | ||
Textarea as ChakraTextarea, | ||
TextareaProps as ChakraTextareaProps, | ||
Textarea as ChakraTextarea, | ||
TextareaProps as ChakraTextareaProps, | ||
} from "@chakra-ui/react"; | ||
|
||
interface TextAreaProps extends Omit<ChakraTextareaProps, "value"> { | ||
value: string; | ||
onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void; | ||
value: string; | ||
onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void; | ||
} | ||
|
||
export const TextArea = ({ value, onChange }: TextAreaProps) => { | ||
return <ChakraTextarea value={value} onChange={onChange} />; | ||
return <ChakraTextarea value={value} onChange={onChange} />; | ||
}; |
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.