You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: custom-component-library/README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,8 @@ These are the ones currently available:
30
30
-[x]`BigInt`
31
31
-[x] Markdown
32
32
-[x] "Enhanced" link
33
-
-[ ] Image (to-do)
33
+
-[x] Image
34
+
-[ ] Colour picker (to-do)
34
35
35
36
## Development
36
37
@@ -59,7 +60,7 @@ Custom components should consider the following:
59
60
-`Tab`/`Shift-Tab` to navigate
60
61
-`Enter` to submit
61
62
-`Escape` to cancel
62
-
- Provide customisation options, particularly styles
63
+
- Provide customisation options, particularly styles (but make sure to specify defaults)
63
64
- If the data contains non-JSON types, add a "stringify" and "reviver" function definition (see `BigInt`, `NaN` and `Symbol` components)
64
65
65
66
If your custom component is "string-like", there are two helper components exported with the package: `StringDisplay` and `StringEdit` -- these are the same components used for the actual "string" elements in the main package. See the [Hyperlink](https://github.com/CarlosNZ/json-edit-react/blob/main/custom-component-library/components/Hyperlink/component.tsx) and [BigInt](https://github.com/CarlosNZ/json-edit-react/blob/main/custom-component-library/components/BigInt/component.tsx) components for examples of how to use them.
0 commit comments