- Clone repo
pnpm install
cd
into this directory,packages/emoji-blast-site
pnpm run dev
- Open http://localhost:3000 to view it in your browser
-
Go to
./src/examples
.- The
/basics
folder contains examples highlighting the configurable properties that can be passed intoemojiBlast()
andemojiBlasts()
. - The
/fun-stuff
folder contains the not-so-basic examples.
- The
-
Follow
fun-stuff/example-template
or the code snippet below to create a new example explosion. The example variables have the following types (these are also listed in./src/types/example-types
):name: string
blurb: string
explosionFunction: () => void
codeSnippet: string
disableButtonTime?: number
(optional)
-
Go to
emojisplosion-demo/src/components/side-bar/side-bar
. -
Import
*
from your new example file at the top ofside-bar
following convention. -
Add your imported example to the appropriate array in
SideBar
.
import { emojiBlast } from "emoji-blast";
export const name = "Example name";
export const blurb = "Example description";
export const codeSnippet = `Copy paste the code from your handleClick below`;
export const explosionFunction = () => {
emojiBlast({
// Create your own explosion!!
});
};
export const disableButtonTime = 0; // time in milliseconds (defaults to 0);