Closed c0ncentus closed 2 years ago
Hey @c0ncentus,
Which selector or counter are you hoping to customize? I plan to make the Facebook selector and counter customizable (after I finish porting it to Typescript. Currently about halfway done). Thanks for reaching out.
Facebook Selector is the most I think 👍 . this will be awesome with GightubCounter et GithubSelector. Thanks for planning to support this awesome package.
awesome script + awesome feature = awesome UI and awesome package ❤️ .
Sounds good! I'm almost done with the Typescript port and then I'll plan on adding custom support for the Facebook Selector and Counter first.
Thanks for your excitement!
@charkour glad to see this package getting revived! Thank you for your work on this. :)
@c0ncentus, I'm trying to design a way to add custom images to the selectors. I think creating a custom selector component would be best.
Do you have suggestions on how to implement it?
Sorry this feature is taking a long time.
@c0ncentus, check out PR #62.
This add's the ability to use custom reactions on the reaction bar
Also works with images.
Useage:
import React from 'react';
import { ReactionBarSelector } from '@charkour/react-reactions';
const Component = () => {
return <ReactionBarSelector />;
};
Props:
iconSize?: number
— String icon pixel size. Defaults to 38px
reactions?: 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" />
hi, thanks to continue the job, make react-reactions great again :) !