@uiw/react-color-github
Advanced tools
Comparing version
@@ -24,2 +24,3 @@ import React from 'react'; | ||
color?: string | HsvaColor; | ||
showTriangle?: boolean; | ||
onChange?: (color: ColorResult) => void; | ||
@@ -26,0 +27,0 @@ } |
@@ -18,3 +18,3 @@ "use strict"; | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
var _excluded = ["prefixCls", "placement", "className", "style", "color", "colors", "rectProps", "onChange", "rectRender"]; | ||
var _excluded = ["prefixCls", "placement", "className", "style", "color", "colors", "showTriangle", "rectProps", "onChange", "rectRender"]; | ||
var CORLER_HEX = ['#B80000', '#DB3E00', '#FCCB00', '#008B02', '#006B76', '#1273DE', '#004DCF', '#5300EB', '#EB9694', '#FAD0C3', '#FEF3BD', '#C1E1C5', '#BEDADC', '#C4DEF6', '#BED3F3', '#D4C4FB']; | ||
@@ -46,2 +46,4 @@ var GithubPlacement = exports.GithubPlacement = /*#__PURE__*/function (GithubPlacement) { | ||
colors = _props$colors === void 0 ? CORLER_HEX : _props$colors, | ||
_props$showTriangle = props.showTriangle, | ||
showTriangle = _props$showTriangle === void 0 ? true : _props$showTriangle, | ||
_props$rectProps = props.rectProps, | ||
@@ -188,8 +190,10 @@ rectProps = _props$rectProps === void 0 ? {} : _props$rectProps, | ||
}, | ||
addonBefore: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, { | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", { | ||
style: arrBrStyl | ||
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { | ||
style: arrStyl | ||
})] | ||
addonBefore: /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, { | ||
children: showTriangle && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, { | ||
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", { | ||
style: arrBrStyl | ||
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { | ||
style: arrStyl | ||
})] | ||
}) | ||
}) | ||
@@ -196,0 +200,0 @@ })); |
@@ -24,2 +24,3 @@ import React from 'react'; | ||
color?: string | HsvaColor; | ||
showTriangle?: boolean; | ||
onChange?: (color: ColorResult) => void; | ||
@@ -26,0 +27,0 @@ } |
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty"; | ||
import _extends from "@babel/runtime/helpers/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; | ||
var _excluded = ["prefixCls", "placement", "className", "style", "color", "colors", "rectProps", "onChange", "rectRender"]; | ||
var _excluded = ["prefixCls", "placement", "className", "style", "color", "colors", "showTriangle", "rectProps", "onChange", "rectRender"]; | ||
import React, { Fragment } from 'react'; | ||
@@ -34,2 +34,3 @@ import { color as handleColor, validHex, hexToHsva, hsvaToHex } from '@uiw/color-convert'; | ||
colors = CORLER_HEX, | ||
showTriangle = true, | ||
rectProps = {}, | ||
@@ -174,8 +175,10 @@ onChange, | ||
}, | ||
addonBefore: /*#__PURE__*/_jsxs(Fragment, { | ||
children: [/*#__PURE__*/_jsx("div", { | ||
style: arrBrStyl | ||
}), /*#__PURE__*/_jsx("div", { | ||
style: arrStyl | ||
})] | ||
addonBefore: /*#__PURE__*/_jsx(Fragment, { | ||
children: showTriangle && /*#__PURE__*/_jsxs(Fragment, { | ||
children: [/*#__PURE__*/_jsx("div", { | ||
style: arrBrStyl | ||
}), /*#__PURE__*/_jsx("div", { | ||
style: arrStyl | ||
})] | ||
}) | ||
}) | ||
@@ -182,0 +185,0 @@ })); |
{ | ||
"name": "@uiw/react-color-github", | ||
"version": "2.4.5", | ||
"version": "2.5.0", | ||
"description": "Color Github Picker", | ||
@@ -52,4 +52,4 @@ "author": "Kenny Wong <wowohoo@qq.com>", | ||
"dependencies": { | ||
"@uiw/color-convert": "2.4.5", | ||
"@uiw/react-color-swatch": "2.4.5" | ||
"@uiw/color-convert": "2.5.0", | ||
"@uiw/react-color-swatch": "2.5.0" | ||
}, | ||
@@ -56,0 +56,0 @@ "devDependencies": { |
@@ -100,2 +100,3 @@ React Color Github | ||
color?: string | HsvaColor; | ||
showTriangle?: boolean; | ||
onChange?: (color: ColorResult) => void; | ||
@@ -102,0 +103,0 @@ } |
Sorry, the diff of this file is not supported yet
33880
1.8%839
1.82%122
0.83%+ Added
+ Added
- Removed
- Removed
Updated