refactor: project and workspace delete modals (#1915)

This commit is contained in:
Aaryan Khandelwal 2023-08-21 11:44:59 +05:30 committed by GitHub
parent d470adf262
commit 2eb956e97e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 124 additions and 122 deletions

View file

@ -29,9 +29,9 @@ export const Input: React.FC<Props> = ({
type={type}
id={id}
value={value}
{...(register && register(name, validations))}
{...(register && register(name ?? "", validations))}
onChange={(e) => {
register && register(name).onChange(e);
register && register(name ?? "").onChange(e);
onChange && onChange(e);
}}
className={`block rounded-md bg-transparent text-sm focus:outline-none placeholder-custom-text-400 ${

View file

@ -3,7 +3,7 @@ import type { UseFormRegister, RegisterOptions } from "react-hook-form";
export interface Props extends React.ComponentPropsWithoutRef<"input"> {
label?: string;
name: string;
name?: string;
value?: string | number | readonly string[];
mode?: "primary" | "transparent" | "trueTransparent" | "secondary" | "disabled";
register?: UseFormRegister<any>;