npm-img_text
v1.0.3
Published
--- # Textimage Component
Downloads
3
Readme
Textimage Component
A React component for displaying text and an image side by side.
Installation
You can install this component via npm:
npm install npm-img_text
Usage
import React from 'react';
import Textimage from 'npm-img_text';
const MyComponent = () => {
const jsonData = {
imageDirection: 'right',
imageWidth: '50%',
imageHeight: 'auto',
backgroundColor: 'bg-light',
color: 'text-dark',
textHeading: 'Welcome to our website',
textBody: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla gravida metus vitae lectus malesuada, eget aliquet felis tristique. Sed non posuere risus, ac vestibulum neque. Aenean varius vehicula mauris non ultricies.',
textButton: 'Learn More',
buttonLink: 'https://example.com'
};
return (
<Textimage jsondata={jsonData} img="path/to/image.jpg" />
);
};
export default MyComponent;
Props
jsondata
: An object containing the data for the text and image, includingimageDirection
,imageWidth
,imageHeight
,backgroundColor
,color
,textHeading
,textBody
,textButton
, andbuttonLink
.img
: The URL of the image to display.
License
This project is licensed under the ISC License.