1.2.2 • Published 10 months ago

maker-enhance v1.2.2

Weekly downloads
29
License
MIT
Repository
github
Last release
10 months ago

MakerEnhance

React component for Maker Enhance.

Installation

yarn add maker-enhance

or

npm install --save maker-enhance

Usage

import MakerEnhance from "maker-enhance";

<MakerEnhance user={yourMakerUserIdOrSlug} />;

Example

import React from "react";
import MakerEnhance from "maker-enhance";

class App extends React.Component {
  render() {
    return (
      <div>
        <MakerEnhance user="user" index="1" />
        <MakerEnhance user="user" index="2" loadingHeight={400} />
      </div>
    );
  }
}

Props

  • user (required) - string - Your Maker user id or slug
  • index - string or number - If you want to render multiple MakerEnhance components on one page, add a unique index prop to each and every one of them so Maker can keep track of multiple instances
  • loadingHeight - number - While Maker is loading, it doesn't know the final height of the content. To prevent Cumulative Layout Shift (CLS), Maker iframe blocks a height of 1000px during the loading and then adjusts to actual content height. If you know that your content height is static and will never be heigher than a certain value (let's say 400px), you can use loadingHeight to override this default 1000px height.
1.2.2

10 months ago

1.2.1

10 months ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

5 years ago

0.0.1

6 years ago