styles-update
This commit is contained in:
8
dist/Input/Input.d.ts
vendored
Normal file
8
dist/Input/Input.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import React from 'react';
|
||||
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
||||
label?: string;
|
||||
error?: string;
|
||||
helperText?: string;
|
||||
}
|
||||
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
||||
export default Input;
|
||||
8
dist/Input/Input.js
vendored
Normal file
8
dist/Input/Input.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
||||
import React from 'react';
|
||||
export const Input = React.forwardRef(({ label, error, helperText, className = '', ...props }, ref) => {
|
||||
return (_jsxs("div", { className: "space-y-1", children: [label && (_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: label })), _jsx("input", { ref: ref, className: `w-full px-3 py-2 border rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-maya-primary focus:border-transparent transition-all ${error
|
||||
? 'border-red-300 bg-red-50'
|
||||
: 'border-gray-300 hover:border-gray-400'} ${className}`, ...props }), error && (_jsx("p", { className: "text-sm text-maya-danger", children: error })), helperText && !error && (_jsx("p", { className: "text-sm text-gray-500", children: helperText }))] }));
|
||||
});
|
||||
export default Input;
|
||||
2
dist/Input/index.d.ts
vendored
Normal file
2
dist/Input/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export { default } from './Input';
|
||||
export type { InputProps } from './Input';
|
||||
1
dist/Input/index.js
vendored
Normal file
1
dist/Input/index.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from './Input';
|
||||
Reference in New Issue
Block a user