New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

emoji-reaction-component

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emoji-reaction-component

Emoji reaction component for React

  • 1.0.0-alpha.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-90%
Maintainers
1
Weekly downloads
 
Created
Source

emoji-reaction

Emoji reaction component for React

Install

npm install --save emoji-reaction
yarn add emoji-reaction

Basic Usage

import React, { Component } from 'react'

import EmojiReaction, {
  TitledReaction,
  AngryReaction,
  CryReaction
} from 'emoji-reaction'

class App extends Component {
  constructor () {
    this.state = { feedback: 'loading' }
  }

  takeWithAPinchOfSalt (reaction) {
    console.log(`Oof! ${reaction}`)
  }

  render () {
    return (
      <EmojiReaction
        onReact={this.takeWithAPinchOfSalt}
        reactions={[
          <TitledReaction title={'Grr'} reaction={AngryReaction} />,
          <TitledReaction title={'Grr'} reaction={HappyReaction} />
        ]}
        {/* optional progress indicator
          valid states - pending/loading/success/err*/}
        progress={this.state.feedback}
        progressIndicator={ProgressIndicator}
      />
    )
  }
}

Demo

Standard

With loading states

TODO

  • Implement and document component themeing
  • resetting the state of the component after submission
  • textual feedback option
  • Prettierify + lint config updates
  • Update the example + fix example build

Acknowledgments

  • Design inspired from https://uimovement.com/ui/3365/reacting-to-content/
  • Reactions from https://www.iconfinder.com/iconsets/reaction

License

MIT © TobyColeman

FAQs

Package last updated on 06 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc