-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"vercel-build":"prisma generate && next build"
- Loading branch information
1 parent
f42a4e3
commit b441851
Showing
18 changed files
with
1,403 additions
and
6 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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,17 @@ | ||
import React from "react"; | ||
export const CloseSVG = ({ | ||
fillColor = "#000000", | ||
className = "", | ||
...props | ||
}) => { | ||
return ( | ||
<svg | ||
fill={fillColor} | ||
xmlns="http://www.w3.org/2000/svg" | ||
className={className} | ||
{...props} | ||
> | ||
<path d="M 4.7070312 3.2929688 L 3.2929688 4.7070312 L 10.585938 12 L 3.2929688 19.292969 L 4.7070312 20.707031 L 12 13.414062 L 19.292969 20.707031 L 20.707031 19.292969 L 13.414062 12 L 20.707031 4.7070312 L 19.292969 3.2929688 L 12 10.585938 L 4.7070312 3.2929688 z" /> | ||
</svg> | ||
); | ||
}; |
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,74 @@ | ||
import React from "react"; | ||
import PropTypes from "prop-types"; | ||
|
||
const shapes = { round: "rounded-[10px]", circle: "rounded-[50%]" }; | ||
const variants = { | ||
outline: { | ||
white_A700: "outline outline-[0.75px] outline-white-A700 text-white-A700", | ||
gray_900: "outline outline-[0.5px] outline-gray-900 text-gray-900", | ||
gray_100: "outline outline-[0.75px] outline-gray-100 text-black-900", | ||
}, | ||
fill: { | ||
gray_900: "bg-gray-900 text-white-A700", | ||
gray_100: "bg-gray-100 text-gray-500", | ||
green_600: "bg-green-600 text-white-A700", | ||
gray_900_67: "bg-gray-900_67", | ||
black_900: "bg-black-900 text-white-A700", | ||
white_A700: "bg-white-A700 text-gray-900", | ||
gray_50: "bg-gray-50 text-black-900", | ||
gray_900_26: "bg-gray-900_26 text-white-A700", | ||
}, | ||
}; | ||
const sizes = { | ||
xs: "p-[7px]", | ||
sm: "pr-[9px] py-[9px]", | ||
md: "p-2.5", | ||
lg: "p-[13px]", | ||
xl: "pr-[15px] py-[15px]", | ||
"2xl": "p-4", | ||
}; | ||
|
||
const Button = ({ | ||
children, | ||
className = "", | ||
leftIcon, | ||
rightIcon, | ||
shape = "", | ||
size = "", | ||
variant = "", | ||
color = "", | ||
...restProps | ||
}) => { | ||
return ( | ||
<button | ||
className={`${className} ${(shape && shapes[shape]) || ""} ${ | ||
(size && sizes[size]) || "" | ||
} ${(variant && variants[variant]?.[color]) || ""}`} | ||
{...restProps} | ||
> | ||
{!!leftIcon && leftIcon} | ||
{children} | ||
{!!rightIcon && rightIcon} | ||
</button> | ||
); | ||
}; | ||
|
||
Button.propTypes = { | ||
className: PropTypes.string, | ||
children: PropTypes.node, | ||
shape: PropTypes.oneOf(["round", "circle"]), | ||
size: PropTypes.oneOf(["xs", "sm", "md", "lg", "xl", "2xl"]), | ||
variant: PropTypes.oneOf(["outline", "fill"]), | ||
color: PropTypes.oneOf([ | ||
"white_A700", | ||
"gray_900", | ||
"gray_100", | ||
"green_600", | ||
"gray_900_67", | ||
"black_900", | ||
"gray_50", | ||
"gray_900_26", | ||
]), | ||
}; | ||
|
||
export { Button }; |
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,13 @@ | ||
import React from "react"; | ||
|
||
export const ErrorMessage = ({ errors = [], className = "" }) => { | ||
return ( | ||
errors?.length > 0 && ( | ||
<div | ||
className={`text-red-500 text-left text-xs w-full mt-1 ${className}`} | ||
> | ||
{errors.join(", ")} | ||
</div> | ||
) | ||
); | ||
}; |
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,19 @@ | ||
import React from "react"; | ||
|
||
const Img = ({ | ||
className, | ||
src = "defaultNoData.png", | ||
alt = "testImg", | ||
...restProps | ||
}) => { | ||
return ( | ||
<img | ||
className={className} | ||
src={src} | ||
alt={alt} | ||
{...restProps} | ||
loading={"lazy"} | ||
/> | ||
); | ||
}; | ||
export { Img }; |
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,84 @@ | ||
import React from "react"; | ||
import PropTypes from "prop-types"; | ||
import { ErrorMessage } from "../../components/ErrorMessage"; | ||
|
||
const variants = { | ||
outline: { | ||
gray_400: "border border-gray-400 border-solid text-black-900", | ||
gray_300: "border border-gray-300 border-solid", | ||
}, | ||
fill: { gray_50: "bg-gray-50 text-gray-500", white_A700: "bg-white-A700" }, | ||
}; | ||
const shapes = { round: "rounded-[15px]" }; | ||
const sizes = { | ||
xs: "pb-[11px] pr-[11px] pt-[13px]", | ||
md: "pb-[18px] pr-[18px] pt-[19px]", | ||
sm: "pb-[15px] pt-[18px]", | ||
}; | ||
|
||
const Input = React.forwardRef( | ||
( | ||
{ | ||
wrapClassName = "", | ||
className = "", | ||
name = "", | ||
placeholder = "", | ||
type = "text", | ||
children, | ||
errors = [], | ||
label = "", | ||
prefix, | ||
suffix, | ||
onChange, | ||
shape = "", | ||
size = "", | ||
variant = "fill", | ||
color = "white_A700", | ||
...restProps | ||
}, | ||
ref, | ||
) => { | ||
const handleChange = (e) => { | ||
if (onChange) onChange(e?.target?.value); | ||
}; | ||
|
||
return ( | ||
<> | ||
<div | ||
className={`${wrapClassName} | ||
${shapes[shape] || ""} | ||
${variants[variant]?.[color] || ""} | ||
${sizes[size] || ""}`} | ||
> | ||
{!!label && label} | ||
{!!prefix && prefix} | ||
<input | ||
ref={ref} | ||
className={`${className} bg-transparent border-0`} | ||
type={type} | ||
name={name} | ||
onChange={handleChange} | ||
placeholder={placeholder} | ||
{...restProps} | ||
/> | ||
{!!suffix && suffix} | ||
</div> | ||
{!!errors && <ErrorMessage errors={errors} />} | ||
</> | ||
); | ||
}, | ||
); | ||
|
||
Input.propTypes = { | ||
wrapClassName: PropTypes.string, | ||
className: PropTypes.string, | ||
name: PropTypes.string, | ||
placeholder: PropTypes.string, | ||
type: PropTypes.string, | ||
shape: PropTypes.oneOf(["round"]), | ||
size: PropTypes.oneOf(["xs", "md", "sm"]), | ||
variant: PropTypes.oneOf(["outline", "fill"]), | ||
color: PropTypes.oneOf(["gray_400", "gray_300", "gray_50", "white_A700"]), | ||
}; | ||
|
||
export { Input }; |
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,6 @@ | ||
import React from "react"; | ||
|
||
const Line = ({ className, ...restProps }) => { | ||
return <div className={className} {...restProps} />; | ||
}; | ||
export { Line }; |
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,10 @@ | ||
import React from "react"; | ||
|
||
const List = ({ children, className, ...restProps }) => { | ||
return ( | ||
<div className={className} {...restProps}> | ||
{children} | ||
</div> | ||
); | ||
}; | ||
export { List }; |
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 @@ | ||
import React from 'react' | ||
|
||
export default function SearchBar() { | ||
return ( | ||
<div>SearchBar</div> | ||
) | ||
} |
Oops, something went wrong.