react-char-fill 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# React Char Fill
|
|
2
2
|
|
|
3
|
-
A versatile React component library for creating
|
|
3
|
+
A versatile React component library for creating customizable character-based ratings. Ideal for star ratings and other similar applications, with fine-grained control over rating steps, colors, and interactivity.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Install the package using your preferred package manager:
|
|
8
8
|
|
|
9
9
|
`npm install react-char-fill`
|
|
10
10
|
|
|
@@ -44,7 +44,7 @@ export default App;
|
|
|
44
44
|
|
|
45
45
|
### Advanced Example
|
|
46
46
|
|
|
47
|
-
You can also customize the colors, font size, and
|
|
47
|
+
You can also customize various aspects of the rating, such as colors, font size, and interactivity:
|
|
48
48
|
|
|
49
49
|
```jsx
|
|
50
50
|
import CharacterRating from 'react-char-fill';
|
|
@@ -71,7 +71,7 @@ export default App;
|
|
|
71
71
|
|
|
72
72
|
### `CharacterRating`
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
This component displays a rating using characters and provides the ability to customize and interact with the rating.
|
|
75
75
|
|
|
76
76
|
#### Props
|
|
77
77
|
|
|
@@ -87,20 +87,6 @@ A component to display a rating using characters.
|
|
|
87
87
|
- `onClick` (function, optional): Function to call on click.
|
|
88
88
|
- `onKeyDown` (function, optional): Function to call on key down.
|
|
89
89
|
|
|
90
|
-
### `CharacterFill`
|
|
91
|
-
|
|
92
|
-
A component used internally by `CharacterRating` to render individual characters.
|
|
93
|
-
|
|
94
|
-
#### Props
|
|
95
|
-
|
|
96
|
-
- `position` (number, required): The position of the character in the rating sequence.
|
|
97
|
-
- `rating` (number, required): The current rating value.
|
|
98
|
-
- `character` (string, required): The character used to represent the rating.
|
|
99
|
-
- `emptyColor` (string, optional): The color for the empty rating characters. Default is `grey`.
|
|
100
|
-
- `fillColor` (string, optional): The color for the filled rating characters. Default is `gold`.
|
|
101
|
-
- `fontSize` (string, optional): The size of the character. Default is `24px`.
|
|
102
|
-
- `step` (number, required): The increment step for the rating value.
|
|
103
|
-
|
|
104
90
|
## Contributing
|
|
105
91
|
|
|
106
92
|
Contributions are welcome! Please follow these steps to contribute:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-char-fill",
|
|
3
3
|
"description": "A React component for creating flexible character-based ratings, perfect for star ratings and other similar use cases.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.4",
|
|
5
5
|
"main": "dist/react-char-fill.umd.js",
|
|
6
6
|
"module": "dist/react-char-fill.es.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|