Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add public brain page #1230

Merged
merged 6 commits into from
Sep 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(Field): add inputClassName key
  • Loading branch information
mamadoudicko committed Sep 20, 2023
commit f5d433010ffff363bb962089610d5e85b12c2329
16 changes: 14 additions & 2 deletions frontend/lib/components/ui/Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,20 @@ interface FieldProps
label?: string;
name: string;
icon?: React.ReactNode;
inputClassName?: string;
}

const Field = forwardRef(
(
{ label, className, name, required = false, icon, ...props }: FieldProps,
{
label,
className,
name,
inputClassName,
required = false,
icon,
...props
}: FieldProps,
forwardedRef
) => {
return (
Expand All @@ -33,7 +42,10 @@ const Field = forwardRef(
<div className="relative">
<input
ref={forwardedRef as RefObject<HTMLInputElement>}
className={`w-full bg-gray-50 dark:bg-gray-900 px-4 py-2 border rounded-md border-black/10 dark:border-white/25`}
className={cn(
`w-full bg-gray-50 dark:bg-gray-900 px-4 py-2 border rounded-md border-black/10 dark:border-white/25`,
inputClassName
)}
name={name}
id={name}
{...props}
Expand Down