nm-imgcard
v1.0.3
Published
--- # Card Component
Readme
Card Component
A React component for displaying cards with product information.
Installation
You can install this component via npm:
npm install nm-imgcardUsage
import React from 'react';
import Card from 'nm-imgcard';
const MyComponent = () => {
const data = [
{
id: 1,
name: 'Product 1',
image: 'https://example.com/image1.jpg',
price: 10.99,
category: 'Category A',
url: 'https://example.com/product1'
},
// Add more data objects as needed
];
return (
<Card data={data} />
);
};
export default MyComponent;Description
This component accepts an array of data objects as props. Each data object represents a product and contains properties such as name, image URL, price, category, and URL. The component displays cards for each product with the option to filter products by category.
Props
data: An array of data objects representing products. Each object should have the following properties:id: Unique identifier for the product.name: Name of the product.image: URL of the product image.price: Price of the product.category: Category of the product.url: URL of the product page.
License
This project is licensed under the ISC License.
