npm-hero
v1.0.3
Published
--- # Banner Component
Downloads
3
Readme
Banner Component
A React component for displaying banners with dynamic content.
Installation
You can install this component via npm:
npm install npm-hero
Usage
import React from 'react';
import Banner from 'npm-hero';
const MyComponent = () => {
const jsonData = {
bannerHeight: '200px',
backgroundColor: 'bg-dark',
color: 'text-light',
heading: 'Welcome to our website',
description: 'Explore our products and services.',
buttons: ['Learn More', 'Contact Us']
};
return (
<Banner jsondata={jsonData} backgroundImage="path/to/background-image.jpg" />
);
};
export default MyComponent;
Props
jsondata
: An object containing the data for the banner, includingbannerHeight
,backgroundColor
,color
,heading
,description
, andbuttons
.backgroundImage
: The URL of the background image for the banner.
License
This project is licensed under the ISC License.