Add's the ability to use custom reactions on the reaction bar
Also works with images.
Useage:
Reaction Bar Selector
import React from 'react';
import { ReactionBarSelector } from '@charkour/react-reactions';
const Component = () => {
return <ReactionBarSelector />;
};
Props:
iconSize?: number — String icon pixel size. Defaults to 38pxreactions?: Reaction[]; — Array of Reaction objects {label: "haha", node: <div>😄</div>} to display.
onSelect: (label: string) => void; — Function callback when emoji is selected
Note: When passing an <img> as a Reaction. Specify the iconSize as the height of the image. <img height={iconSize} src="img-source" />
Add's the ability to use custom reactions on the reaction bar
Also works with images.
Useage:
Reaction Bar Selector
Props:
iconSize?: number
— String icon pixel size. Defaults to38px
reactions?: Reaction[];
— Array of Reaction objects{label: "haha", node: <div>😄</div>}
to display.onSelect: (label: string) => void;
— Function callback when emoji is selectedNote: When passing an
<img>
as a Reaction. Specify theiconSize
as the height of the image.<img height={iconSize} src="img-source" />