Files
rentall-app/frontend/src/components/ItemInformation.tsx
2025-10-15 15:19:23 -04:00

53 lines
1.1 KiB
TypeScript

import React from "react";
interface ItemInformationProps {
name: string;
description: string;
onChange: (
e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>
) => void;
}
const ItemInformation: React.FC<ItemInformationProps> = ({
name,
description,
onChange,
}) => {
return (
<div className="card mb-4">
<div className="card-body">
<div className="mb-3">
<label htmlFor="name" className="form-label">
Item Name *
</label>
<input
type="text"
className="form-control"
id="name"
name="name"
value={name}
onChange={onChange}
required
/>
</div>
<div className="mb-3">
<label htmlFor="description" className="form-label">
Description
</label>
<textarea
className="form-control"
id="description"
name="description"
rows={4}
value={description}
onChange={onChange}
/>
</div>
</div>
</div>
);
};
export default ItemInformation;