From 18dfae7c1f6aee997f70e0c99dde2564a79f1191 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Fri, 22 Sep 2023 17:57:55 +0800 Subject: [PATCH] type(Hex): fix hue type issue. (#128) --- packages/color-hue/README.md | 11 +++++++++++ packages/color-hue/src/index.tsx | 2 +- packages/color/README.md | 4 ++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/color-hue/README.md b/packages/color-hue/README.md index 9d4bef96f..6e6d6114e 100644 --- a/packages/color-hue/README.md +++ b/packages/color-hue/README.md @@ -34,6 +34,17 @@ export default function Demo() { } ``` +```jsx mdx:preview +import React, { useState } from 'react'; +import Hue from '@uiw/react-color-hue'; + +export default function Demo() { + return ( + + ); +} +``` + ## Props ```ts diff --git a/packages/color-hue/src/index.tsx b/packages/color-hue/src/index.tsx index dfefc8acf..86d19c8bc 100644 --- a/packages/color-hue/src/index.tsx +++ b/packages/color-hue/src/index.tsx @@ -3,7 +3,7 @@ import Alpha, { AlphaProps } from '@uiw/react-color-alpha'; export interface HueProps extends Omit { onChange?: (newHue: { h: number }) => void; - hue: number; + hue?: number; } const Hue = React.forwardRef((props, ref) => { diff --git a/packages/color/README.md b/packages/color/README.md index 86ab0af12..bb3b406bd 100644 --- a/packages/color/README.md +++ b/packages/color/README.md @@ -116,6 +116,10 @@ function Demo() { } ``` +## Documentation + +You can find the react-color documentation [on the website](https://uiwjs.github.io/react-color/). + ## Packages Package | Bundle size(gzip) | Downloads | Version / unpkg