transcriptor-web/bootstrap/ssr/assets/TextInput-CMJy2hIv.js
2025-04-05 15:58:14 +02:00

29 lines
826 B
JavaScript

import { jsx } from "react/jsx-runtime";
import classNames from "classnames";
import { forwardRef } from "react";
function InputError({
message,
className,
children
}) {
if (!message && !children) {
return null;
}
return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx("p", { className: "text-sm text-red-600 dark:text-red-400", children: message || children }) });
}
const TextInput = forwardRef((props, ref) => /* @__PURE__ */ jsx(
"input",
{
...props,
ref,
className: classNames(
"border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 rounded-md shadow-xs",
props.className
)
}
));
export {
InputError as I,
TextInput as T
};