@uiw/react-color-swatch
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -20,3 +20,3 @@ import React from 'react'; | ||
rectProps?: React.HTMLAttributes<HTMLDivElement>; | ||
rectRender?: (props: SwatchRectRenderProps) => JSX.Element; | ||
rectRender?: (props: SwatchRectRenderProps) => JSX.Element | undefined; | ||
onChange?: (hsva: HsvaColor, color: ColorResult, evn: React.MouseEvent<HTMLDivElement, MouseEvent>) => void; | ||
@@ -23,0 +23,0 @@ addonAfter?: React.ReactNode; |
@@ -66,15 +66,16 @@ "use strict"; | ||
var checked = color && color.toLocaleLowerCase() === background.toLocaleLowerCase(); | ||
if (rectRender) { | ||
return rectRender({ | ||
key: idx, | ||
title: title, | ||
color: background, | ||
checked: !!checked, | ||
style: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, rectStyle), {}, { | ||
background: background | ||
}), | ||
onClick: function onClick(evn) { | ||
return handleClick(background, evn); | ||
} | ||
}); | ||
var render = rectRender && rectRender({ | ||
key: idx, | ||
title: title, | ||
color: background, | ||
checked: !!checked, | ||
style: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, rectStyle), {}, { | ||
background: background | ||
}), | ||
onClick: function onClick(evn) { | ||
return handleClick(background, evn); | ||
} | ||
}); | ||
if (render) { | ||
return render; | ||
} | ||
@@ -81,0 +82,0 @@ var child = rectProps.children && /*#__PURE__*/_react["default"].isValidElement(rectProps.children) ? /*#__PURE__*/_react["default"].cloneElement(rectProps.children, { |
@@ -20,3 +20,3 @@ import React from 'react'; | ||
rectProps?: React.HTMLAttributes<HTMLDivElement>; | ||
rectRender?: (props: SwatchRectRenderProps) => JSX.Element; | ||
rectRender?: (props: SwatchRectRenderProps) => JSX.Element | undefined; | ||
onChange?: (hsva: HsvaColor, color: ColorResult, evn: React.MouseEvent<HTMLDivElement, MouseEvent>) => void; | ||
@@ -23,0 +23,0 @@ addonAfter?: React.ReactNode; |
@@ -58,13 +58,14 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
var checked = color && color.toLocaleLowerCase() === background.toLocaleLowerCase(); | ||
if (rectRender) { | ||
return rectRender({ | ||
key: idx, | ||
title, | ||
color: background, | ||
checked: !!checked, | ||
style: _extends({}, rectStyle, { | ||
background | ||
}), | ||
onClick: evn => handleClick(background, evn) | ||
}); | ||
var render = rectRender && rectRender({ | ||
key: idx, | ||
title, | ||
color: background, | ||
checked: !!checked, | ||
style: _extends({}, rectStyle, { | ||
background | ||
}), | ||
onClick: evn => handleClick(background, evn) | ||
}); | ||
if (render) { | ||
return render; | ||
} | ||
@@ -71,0 +72,0 @@ var child = rectProps.children && /*#__PURE__*/React.isValidElement(rectProps.children) ? /*#__PURE__*/React.cloneElement(rectProps.children, { |
{ | ||
"name": "@uiw/react-color-swatch", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Color swatch component for React.", | ||
@@ -38,3 +38,3 @@ "homepage": "https://uiwjs.github.io/react-color/#/swatch", | ||
"dependencies": { | ||
"@uiw/color-convert": "2.0.0" | ||
"@uiw/color-convert": "2.0.1" | ||
}, | ||
@@ -41,0 +41,0 @@ "devDependencies": { |
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
17106
356
+ Added@uiw/color-convert@2.0.1(transitive)
- Removed@uiw/color-convert@2.0.0(transitive)
Updated@uiw/color-convert@2.0.1