MrBartusek / gif-picker-react

Tenor GIF Picker component for React ⚛️
http://dokurno.dev/gif-picker-react/
MIT License
38 stars 12 forks source link

Add disabled property #27

Closed ptahchiev closed 6 months ago

ptahchiev commented 8 months ago

Hello,

is there a chance to add a disabled property to be able to be able to control the disabled state?

Thank you and keep up the good work.

MrBartusek commented 7 months ago

Hey, I've trouble understanding your vision for this future. To consider it I need to ask additional questions:

ptahchiev commented 7 months ago

Sure, my thought is that if I set the disabled property to true then the button would be clickable and also the panel to select a gif would not open. My use case is the following. I am implementing a chat where users are able to send gifs. The chat feature is enabled only when the user has paid a monthly subscription. If the user has not paid a monthly subscription the textarea for chatting is disabled (they cannot input text) but I also want to disable the gif picker button so that the gif panel doesn't open when clicked.

MrBartusek commented 7 months ago

my thought is that if I set the disabled property to true then the button would be clickable and also the panel to select a gif would not open.

Then you should disable said button element, not the picker.

MrBartusek commented 6 months ago

Closing due inactivity