Skip to content

Commit 74defc5

Browse files
committedOct 5, 2023
1.0.4, fix readme
1 parent 9cbdb17 commit 74defc5

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed
 

‎CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# react-admin-color-components Changelog
22

3+
## 1.0.4
4+
5+
- Edited README
6+
37
## 1.0.3
48

59
- Added pickerHeader prop to ColorInput

‎README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ npm install react-admin-color-components --save
1212

1313
![colorpicker.png](assets/colorpicker.png)
1414

15-
This package provides a ColorInput component based on the [react-color](https://www.npmjs.com/package/react-color) pickers librray, as well as a corresponding ColorField and ColorSquare (which is used to display the current color in both aforementioned components) for use in a [react-admin](https://marmelab.com/react-admin/) application.
15+
This package provides a ColorInput component based on the [react-color](https://www.npmjs.com/package/react-color) pickers libray, as well as a corresponding ColorField and ColorSquare (which is used to display the current color in both aforementioned components) for use in a [react-admin](https://marmelab.com/react-admin/) application.
1616

17-
The ColorInput's default picker is the PhotoshopPicker, but the prop `picker` can be used to override the default. Additional props for the picker can be passed as part of `pickerOptions`. The picker's header can be overriden by using the `pickerHeader` prop.
17+
The ColorInput's default picker is the PhotoshopPicker, but the prop `picker` can be used to override the default. Additional props for the picker can be passed as part of `pickerOptions`. The picker's header can be overriden using the `pickerHeader` prop.
1818

19-
The ColorInput accepts most react-admin input props, including `validate`, `defaultValue`, `fullWidth`, `helperText`, `sx`, etc., and (obviously) requires a `source` and a `label` to be defined in order to work correctly as a form input or filter.
19+
The ColorInput accepts most react-admin input props, including `validate`, `defaultValue`, `fullWidth`, `helperText`, `sx`, etc., and requires a `source` to be defined in order to work correctly as a form input or filter.
2020

21-
The ColorInput uses a "fragile controlled" input strategy in which the current field value is stored in React state while the picker is open, and the field value is only updated once `onChangeComplete` is called, which is usually at the point of closing the picker. If the picker is closed without confirming, such as clicking `Cancel` on the Photoshop picker, the field value will not be updated.
21+
The ColorInput uses a "fragile controlled" input strategy in which the current field value is stored in React state while the picker is open, and the field value is only updated once `onChangeComplete` is called, which is usually at the point of closing the picker. If the picker is closed without confirming, such as clicking `Cancel` on the Photoshop picker, the field's value will not be updated.
2222

2323
This package is based on the previous work of [alexgschwend](https://github.com/alexgschwend) and [vascofg](https://github.com/vascofg), who built similar component libraries.
2424

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-admin-color-components",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "ColorInput and ColorField for react-admin based on react-color",
55
"main": "lib/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)
Please sign in to comment.