Files
OpenStock/components/forms/InputField.tsx
ravixalgorithm 74cc4307b9 feat(ui): redesign the app in the dashboard-craft language
Floated shell with a dark sidebar and browser-style tabs, hatch shells, bento tiles,
warm OKLCH palette with OpenStock teal, Plus Jakarta Sans + IBM Plex Mono.
Rebuilt stock page (native header, streaming), watchlist (real table, alerts pane,
news rows), auth pages (live product preview, choice chips), search palette,
alert modal and donate popup. Removes Header/Footer/NavItems/UserDropdown/SirayBanner
and the unused watchlist widgets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 15:28:19 +05:30

26 lines
893 B
TypeScript

import React from 'react'
import {Label} from "@/components/ui/label";
import {Input} from "@/components/ui/input";
import {cn} from "@/lib/utils";
const InputField = ({name, label, placeholder, type ="text", register, error, validation, disabled, value}: FormInputProps) => {
return (
<div className="space-y-2">
<Label htmlFor={name} className="form-label">
{label}
</Label>
<Input
type={type}
id={name}
placeholder={placeholder}
disabled={disabled}
value={value}
className={cn('form-input', {'opacity-50 cursor-not-allowed': disabled})}
{...register(name, validation)}
/>
{error && <p className="text-[13px] text-down">{error.message}</p>}
</div>
)
}
export default InputField