Profile page (#190)

This commit is contained in:
Luke Vella 2022-05-25 16:25:49 +01:00 committed by GitHub
parent d7043891fa
commit 3384c937c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 441 additions and 38 deletions

View file

@ -0,0 +1,26 @@
import clsx from "clsx";
import * as React from "react";
export interface TextInputProps
extends React.DetailedHTMLProps<
React.InputHTMLAttributes<HTMLInputElement>,
HTMLInputElement
> {
error?: boolean;
}
export const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
function TextInput({ className, error, ...forwardProps }, ref) {
return (
<input
ref={ref}
type="text"
className={clsx("input", className, {
"input-error": error,
"bg-slate-50 text-slate-500": forwardProps.disabled,
})}
{...forwardProps}
/>
);
},
);