2.0.1 • Published 4 months ago

maker-enhance v2.0.1

Weekly downloads
29
License
MIT
Repository
github
Last release
4 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";

export default function Page() {
  return (
    <div>
      <MakerEnhance user="user" instanceId="header" />
      <MakerEnhance user="user" instanceId="page" loadingHeight={400} />
    </div>
  );
}

Props

  • user (required) - string - Your Maker user id or slug
  • instanceId - string - If you want to render multiple MakerEnhance components on one page, add a unique instanceId 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.
2.0.1

4 months ago

2.0.0

12 months ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

7 years ago