2.0.2 • Published 2 months ago

@coder-shubh/feedback-star v2.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

Demo

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
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;
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.

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.

2.0.2

2 months ago

2.0.1

2 months ago

2.0.0

2 months ago

1.0.9

2 months ago

1.0.8

2 months ago

1.0.7

2 months ago

1.0.6

2 months ago

1.0.5

2 months ago

1.0.4

2 months ago

1.0.3

2 months ago

1.0.2

2 months ago

1.0.1

2 months ago

1.0.0

2 months ago