1.2.1 • Published 1 year ago

nextjs-animal-avatar-generator v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

To make this library compatible with Next.js, the following changes were made:

  1. Updated the TypeScript configuration to output CommonJS modules instead of ESM.
  2. Provided instructions for users on how to adjust the import syntax for the avatar function in their Next.js components to work with this modified library.

In your Next.js project, install the package using npm or yarn:

npm install https://github.com/vlazic/nextjs-animal-avatar-generator --save yarn add https://github.com/vlazic/nextjs-animal-avatar-generator

To use the generator in your Next.js components, you can require the library:

const avatar = require('nextjs-animal-avatar-generator').default;

Then, you can use the avatar function to generate SVG avatars:

function Avatar(props) {
  const svg = avatar(props.name, { size: 200 });

  return (
    <div width="200" height="200" dangerouslySetInnerHTML={{ __html: svg }} />
  );
}

For the complete list of configuration options, please refer to the original Animal Avatar Generator library.

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago