@uiw/react-color-chrome
Advanced tools
Comparing version 2.3.1 to 2.3.2
import React from 'react'; | ||
import { GithubProps } from '@uiw/react-color-github'; | ||
import { type GithubProps } from '@uiw/react-color-github'; | ||
export declare enum ChromeInputType { | ||
@@ -4,0 +4,0 @@ HEXA = "hexa", |
@@ -169,3 +169,4 @@ "use strict"; | ||
width: '100%', | ||
height: 12 | ||
height: 12, | ||
borderRadius: 2 | ||
}, | ||
@@ -185,3 +186,4 @@ pointerProps: pointerProps, | ||
marginTop: 6, | ||
height: 12 | ||
height: 12, | ||
borderRadius: 2 | ||
}, | ||
@@ -224,3 +226,3 @@ pointerProps: pointerProps, | ||
}, | ||
aProps: { | ||
aProps: showAlpha == false ? false : { | ||
labelStyle: labelStyle, | ||
@@ -256,3 +258,3 @@ inputStyle: inputStyle | ||
}, | ||
aProps: { | ||
aProps: showAlpha == false ? false : { | ||
labelStyle: labelStyle, | ||
@@ -259,0 +261,0 @@ inputStyle: inputStyle |
import React from 'react'; | ||
import { GithubProps } from '@uiw/react-color-github'; | ||
import { type GithubProps } from '@uiw/react-color-github'; | ||
export declare enum ChromeInputType { | ||
@@ -4,0 +4,0 @@ HEXA = "hexa", |
@@ -148,3 +148,4 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
width: '100%', | ||
height: 12 | ||
height: 12, | ||
borderRadius: 2 | ||
}, | ||
@@ -164,3 +165,4 @@ pointerProps: pointerProps, | ||
marginTop: 6, | ||
height: 12 | ||
height: 12, | ||
borderRadius: 2 | ||
}, | ||
@@ -203,3 +205,3 @@ pointerProps: pointerProps, | ||
}, | ||
aProps: { | ||
aProps: showAlpha == false ? false : { | ||
labelStyle, | ||
@@ -233,3 +235,3 @@ inputStyle | ||
}, | ||
aProps: { | ||
aProps: showAlpha == false ? false : { | ||
labelStyle, | ||
@@ -236,0 +238,0 @@ inputStyle |
{ | ||
"name": "@uiw/react-color-chrome", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"description": "Color Github Picker", | ||
@@ -40,10 +40,10 @@ "author": "Kenny Wong <wowohoo@qq.com>", | ||
"dependencies": { | ||
"@uiw/color-convert": "2.3.1", | ||
"@uiw/react-color-alpha": "2.3.1", | ||
"@uiw/react-color-editable-input": "2.3.1", | ||
"@uiw/react-color-editable-input-hsla": "2.3.1", | ||
"@uiw/react-color-editable-input-rgba": "2.3.1", | ||
"@uiw/react-color-github": "2.3.1", | ||
"@uiw/react-color-hue": "2.3.1", | ||
"@uiw/react-color-saturation": "2.3.1" | ||
"@uiw/color-convert": "2.3.2", | ||
"@uiw/react-color-alpha": "2.3.2", | ||
"@uiw/react-color-editable-input": "2.3.2", | ||
"@uiw/react-color-editable-input-hsla": "2.3.2", | ||
"@uiw/react-color-editable-input-rgba": "2.3.2", | ||
"@uiw/react-color-github": "2.3.2", | ||
"@uiw/react-color-hue": "2.3.2", | ||
"@uiw/react-color-saturation": "2.3.2" | ||
}, | ||
@@ -50,0 +50,0 @@ "devDependencies": { |
@@ -80,2 +80,44 @@ React Color Chrome | ||
Disable the opacity setting by setting `showAlpha` to `false`. | ||
```jsx mdx:preview | ||
import React, { useState } from 'react'; | ||
import { | ||
HsvaColor, | ||
hsvaToRgbaString, | ||
color as handleColor, | ||
validHex, | ||
hexToHsva, | ||
hsvaToHex, | ||
hsvaToHexa, | ||
} from '@uiw/color-convert'; | ||
import Chrome from '@uiw/react-color-chrome'; | ||
import { GithubPlacement } from '@uiw/react-color-github'; | ||
function Demo() { | ||
const [hsva, setHsva] = useState({ h:0, s:25.71, v:82.35, a:0.32}); | ||
const hex = hsvaToHex(hsva) | ||
return ( | ||
<> | ||
<Chrome | ||
color={hsva} | ||
style={{ marginTop: 10 }} | ||
placement={GithubPlacement.TopRight} | ||
showAlpha={false} | ||
onChange={(color) => { | ||
setHsva(color.hsva); | ||
}} | ||
/> | ||
<div style={{ background: hex, marginTop: 30, padding: 10 }}> | ||
{hex} | ||
</div> | ||
</> | ||
); | ||
} | ||
export default Demo; | ||
``` | ||
## Props | ||
@@ -82,0 +124,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42200
978
159
+ Added@uiw/color-convert@2.3.2(transitive)
+ Added@uiw/react-color-alpha@2.3.2(transitive)
+ Added@uiw/react-color-editable-input@2.3.2(transitive)
+ Added@uiw/react-color-editable-input-hsla@2.3.2(transitive)
+ Added@uiw/react-color-editable-input-rgba@2.3.2(transitive)
+ Added@uiw/react-color-github@2.3.2(transitive)
+ Added@uiw/react-color-hue@2.3.2(transitive)
+ Added@uiw/react-color-saturation@2.3.2(transitive)
+ Added@uiw/react-color-swatch@2.3.2(transitive)
+ Added@uiw/react-drag-event-interactive@2.3.2(transitive)
- Removed@uiw/color-convert@2.3.1(transitive)
- Removed@uiw/react-color-alpha@2.3.1(transitive)
- Removed@uiw/react-color-editable-input@2.3.1(transitive)
- Removed@uiw/react-color-editable-input-hsla@2.3.1(transitive)
- Removed@uiw/react-color-editable-input-rgba@2.3.1(transitive)
- Removed@uiw/react-color-github@2.3.1(transitive)
- Removed@uiw/react-color-hue@2.3.1(transitive)
- Removed@uiw/react-color-saturation@2.3.1(transitive)
- Removed@uiw/react-color-swatch@2.3.1(transitive)
- Removed@uiw/react-drag-event-interactive@2.3.1(transitive)
Updated@uiw/color-convert@2.3.2
Updated@uiw/react-color-alpha@2.3.2
Updated@uiw/react-color-hue@2.3.2