1.0.3 • Published 1 year ago

npm-img_text v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

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, including imageDirection, imageWidth, imageHeight, backgroundColor, color, textHeading, textBody, textButton, and buttonLink.
  • img: The URL of the image to display.

License

This project is licensed under the ISC License.

1.0.3

1 year ago