style: create project modal (#1741)

This commit is contained in:
Anmol Singh Bhatia 2023-08-01 13:34:54 +05:30 committed by GitHub
parent 85a7a7df2b
commit e48147f87e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -47,7 +47,7 @@ type Props = {
const defaultValues: Partial<IProject> = { const defaultValues: Partial<IProject> = {
cover_image: cover_image:
"https://images.unsplash.com/photo-1575116464504-9e7652fddcb3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwyODUyNTV8MHwxfHNlYXJjaHwxOHx8cGxhbmV8ZW58MHx8fHwxNjgxNDY4NTY5&ixlib=rb-4.0.3&q=80&w=1080", "https://images.unsplash.com/photo-1531045535792-b515d59c3d1f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=870&q=80",
description: "", description: "",
emoji_and_icon: getRandomEmoji(), emoji_and_icon: getRandomEmoji(),
identifier: "", identifier: "",
@ -213,7 +213,7 @@ export const CreateProjectModal: React.FC<Props> = ({ isOpen, setIsOpen, user })
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
> >
<Dialog.Panel className="transform rounded-lg bg-custom-background-100 text-left shadow-xl transition-all p-3 w-full sm:w-3/5 lg:w-1/2 xl:w-2/5"> <Dialog.Panel className="transform rounded-lg bg-custom-background-100 text-left shadow-xl transition-all p-3 w-full sm:w-3/5 lg:w-1/2 xl:w-2/5">
<div className="group relative h-36 w-full rounded-lg bg-custom-background-80"> <div className="group relative h-44 w-full rounded-lg bg-custom-background-80">
{watch("cover_image") !== null && ( {watch("cover_image") !== null && (
<img <img
src={watch("cover_image")!} src={watch("cover_image")!}
@ -310,7 +310,7 @@ export const CreateProjectModal: React.FC<Props> = ({ isOpen, setIsOpen, user })
<TextArea <TextArea
id="description" id="description"
name="description" name="description"
className="text-sm !h-[8rem]" className="text-sm !h-24"
placeholder="Description..." placeholder="Description..."
error={errors.description} error={errors.description}
register={register} register={register}
@ -327,6 +327,7 @@ export const CreateProjectModal: React.FC<Props> = ({ isOpen, setIsOpen, user })
<CustomSelect <CustomSelect
value={value} value={value}
onChange={onChange} onChange={onChange}
buttonClassName="border-[0.5px] !px-2 shadow-md"
label={ label={
<div className="flex items-center gap-2 -mb-0.5 py-1"> <div className="flex items-center gap-2 -mb-0.5 py-1">
{currentNetwork ? ( {currentNetwork ? (
@ -369,6 +370,7 @@ export const CreateProjectModal: React.FC<Props> = ({ isOpen, setIsOpen, user })
value={value} value={value}
onChange={onChange} onChange={onChange}
options={options} options={options}
buttonClassName="!px-2 shadow-md"
label={ label={
<div className="flex items-center justify-center gap-2 py-[1px]"> <div className="flex items-center justify-center gap-2 py-[1px]">
{value ? ( {value ? (

View File

@ -22,7 +22,7 @@ export const SecondaryButton: React.FC<ButtonProps> = ({
} ${disabled ? "cursor-not-allowed border-custom-border-200 bg-custom-background-90" : ""} ${ } ${disabled ? "cursor-not-allowed border-custom-border-200 bg-custom-background-90" : ""} ${
outline outline
? "bg-transparent hover:bg-custom-background-80" ? "bg-transparent hover:bg-custom-background-80"
: "bg-custom-background-80 hover:border-opacity-70 hover:bg-opacity-70" : "bg-custom-background-100 hover:border-opacity-70 hover:bg-opacity-70"
} ${loading ? "cursor-wait" : ""}`} } ${loading ? "cursor-wait" : ""}`}
onClick={onClick} onClick={onClick}
disabled={disabled || loading} disabled={disabled || loading}