Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BD-46] docs: update color picker readme #2646

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions src/ColorPicker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ notes: |

```jsx live
() => {
const [colorSm, setColorSm] = useState('')
const [colorMd, setColorMd] = useState('')
const [colorSm, setColorSm] = useState('#60c6b5')
const [colorMd, setColorMd] = useState('#ea0000')

return (
<div className="d-flex bg-light p-2" style={{ columnGap: '1rem' }}>
Expand All @@ -28,10 +28,20 @@ notes: |
```
### With good and malformatted default color passed

Input Requirement for the `ColorPicker`
For the `ColorPicker` to function correctly, please ensure you provide a valid hexadecimal color value.

Valid Format: `#rrggbb`

- `rr`, `gg`, `bb` represent two-digit hexadecimal numbers (ranging from `00` to `FF`).

Note:
- *Passing an empty string or a malformatted value will trigger an error in the color picker modal. Always ensure your input matches the correct format.*

```jsx live

() => {
const [color, setColor] = useState('#32116c')
const [color, setColor] = useState('')
const [colorBad, setColorBad] = useState('#badcolor')

return (
Expand Down