mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-09 14:11:51 +02:00
Profile page (#190)
This commit is contained in:
parent
d7043891fa
commit
3384c937c0
18 changed files with 441 additions and 38 deletions
26
src/components/text-input.tsx
Normal file
26
src/components/text-input.tsx
Normal 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}
|
||||
/>
|
||||
);
|
||||
},
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue