mirror of
https://github.com/linkwarden/linkwarden.git
synced 2026-06-29 07:16:18 +00:00
25 lines
624 B
TypeScript
25 lines
624 B
TypeScript
import { cn } from "@linkwarden/lib/utils";
|
|
import React, { forwardRef } from "react";
|
|
|
|
export type TextInputProps = React.ComponentPropsWithoutRef<"input">;
|
|
|
|
const TextInput = forwardRef<HTMLInputElement, TextInputProps>(
|
|
({ className, type = "text", ...rest }, ref) => {
|
|
return (
|
|
<input
|
|
ref={ref}
|
|
type={type}
|
|
className={cn(
|
|
"w-full rounded-md p-2 border-neutral-content border-solid border outline-none focus:border-primary duration-100",
|
|
className
|
|
)}
|
|
{...rest}
|
|
/>
|
|
);
|
|
}
|
|
);
|
|
|
|
TextInput.displayName = "TextInput";
|
|
|
|
export default TextInput;
|