Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@web-lite/content-rating

Package Overview
Dependencies
Maintainers
6
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web-lite/content-rating

[![Screenshots of design][1]][1]

  • 0.0.4
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
6
Weekly downloads
 
Created
Source

Screen shots

Screenshots of design

Usage

// version @next compatible with react 17 and Mui version 5.0.0-rc.1
// size ~= 7.7kb
import { openContentRating } from '@web-lite/content-rating/@next'
// or
import openContentRating from '@web-lite/content-rating/@next'
// or
import openContentRating from '@web-lite/content-rating'

// version v4 compatible with react >=16.8 and no material needed
// size ~= 150kb
import { openContentRating } from '@web-lite/content-rating/@bundled'
// or
import openContentRating from '@web-lite/content-rating/@bundled'

type and Data

const t = {
  title: 'این محتوا را چگونه ارزیابی میکنید؟',
  submitText: 'ثبت',
  ratingFeedback: {
    1: 'با کمک شما محصول بهتری خواهیم شد',
    2: 'با کمک شما محصول بهتری خواهیم شد',
    3: 'ارزیابی شما ثبت شد، با تشکر',
    4: 'ارزیابی شما ثبت شد، با تشکر',
    5: 'ارزیابی شما ثبت شد، با تشکر',
  },
}

export type Rate = 1 | 2 | 3 | 4 | 5

export type SideEffectFunction = () => {}

export interface ContentRateProps {
  title?: typeof t['title']
  submitText?: typeof t['submitText']
  destroyDelay?: number
  onClose?: SideEffectFunction
  onSubmit?: (rate: Rate) => Promise<void>
  onDestroy: SideEffectFunction
  ratingFeedback?: typeof t['ratingFeedback']
}

exported functions

type openContentRating = async (
  instance: string,
  config: ContentRateProps) => Promise<void>

TODO:

  • Add compatible version 4 using mui/lab to shrink code size
  • Export esm after this issue has been resolve

FAQs

Package last updated on 16 Sep 2021

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