A minimal React component to generate cool names for demo projects, throwaway accounts, containers, and anything really!
npm install @dancingparakeet/word-weaver
# or
yarn add @dancingparakeet/word-weaver
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;
Prop | Type | Description |
---|---|---|
generate |
() => void |
Optional custom function to generate a word |
onWordGenerated |
() => void |
Callback function called with the generated word |
Made with 💖 by dancingparakeet
GitHub: @dancingparakeet
This project is licensed under the MIT License Feel free to use this code wherever you'd like