Socket
Socket
Sign inDemoInstall

@coder-shubh/feedback-star

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @coder-shubh/feedback-star

A React-Native component for feedback star rating.


Version published
Weekly downloads
1
decreased by-93.33%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

@coder-shubh/feedback-star

npm version

Demo

A React Native component for implementing feedback star ratings easily.

Table of Contents

  • Installation
  • Usage
  • Props
  • License

Installation

You can install the @coder-shubh/feedback-star package using npm or yarn:

# with npm
npm i @coder-shubh/feedback-star react-native-vector-icons

# with yarn
yarn add @coder-shubh/feedback-star react-native-vector-icons

Usage

import React from "react";
import { View, StyleSheet } from "react-native";
import { FeedBackStar } from "@coder-shubh/feedback-star";

const App = () => {
  const handleStarPress = (rating: number) => {
    console.log("Selected rating:", rating);
  };

  return (
    <View style={styles.container}>
      <FeedBackStar
        initialRating={3}
        onStarPress={handleStarPress}
        starSize={40}
        selectedColor="#ffb300"
        unselectedColor="#000"
      />
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: "center",
    alignItems: "center",
    backgroundColor: "#F0F1F5",
  },
});

export default App;

Props

PropTypeDescriptionDefault Value
initialRatingnumberThe initial rating value.0
onStarPress(rating: number) => voidA callback function triggered when a star is pressed.-
starSizenumberThe size of each star.52
selectedColorstringThe color of selected stars.'#ffb300'
unselectedColorstringThe color of unselected stars.'#000'

In this table:

Prop: Name of the prop. Type: Type of the prop. Description: Description of what the prop does. Default Value: Default value of the prop, if any.

License

This project is licensed under the MIT License - see the LICENSE file for details.

In this version, I've added:

  • Title and badges centered at the top.
  • Descriptive text centered.
  • Table of Contents for easy navigation.
  • Stylish section headings.
  • Usage code block with syntax highlighting.
  • More visual appeal with horizontal lines and section separators.

Feel free to adjust the styles, colors, or any other aspects to better suit your preferences or project branding.

Keywords

FAQs

Last updated on 22 Mar 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc