1.0.1 • Published 11 months ago
@dancingparakeet/word-weaver v1.0.1
Word Weaver
A minimal React component to generate cool names for demo projects, throwaway accounts, containers, and anything really!
Installation
npm install @dancingparakeet/word-weaver
# or
yarn add @dancingparakeet/word-weaver
Usage Example
import React from 'react';
import WordWeaver from '@dancingparakeey/word-weaver';
const CustomWordGenerator = () => {
const customGenerate = () => {
// Custom word generation logic
console.log('Custom generate logic called');
};
const handleCustomWordGenerated = (word) => {
console.log('Custom generated word:', word);
};
return (
<div>
<h2>Custom Word Generator</h2>
<WordWeaver generate={customGenerate} onWordGenerated={handleCustomWordGenerated} />
</div>
);
};
export default CustomWordGenerator;
Props
Prop | Type | Description |
---|---|---|
generate | () => void | Optional custom function to generate a word |
onWordGenerated | () => void | Callback function called with the generated word |
Author
Made with 💖 by dancingparakeet
GitHub: @dancingparakeet
License
This project is licensed under the MIT License Feel free to use this code wherever you'd like