DataDescription
Summary: _typescript_ Reviewed By: danielbuechele Differential Revision: D17174253 fbshipit-source-id: d2ad87954a4fe49626f35234c2a9db180093fc54
This commit is contained in:
committed by
Facebook Github Bot
parent
d7814b19da
commit
f4bb0f987f
@@ -90,6 +90,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/promise-retry": "^1.1.3",
|
||||
"@types/react-color": "^3.0.1",
|
||||
"@types/react-transition-group": "^4.2.2",
|
||||
"@types/redux-devtools-extension": "^2.13.2",
|
||||
"@types/rsocket-tcp-server": "^0.0.2",
|
||||
|
||||
@@ -341,7 +341,21 @@ class ColorEditor extends Component<{
|
||||
colors.pink,
|
||||
colors.grape,
|
||||
]}
|
||||
onChange={this.onChange}
|
||||
onChange={(color: {
|
||||
hex: string;
|
||||
hsl: {
|
||||
a?: number;
|
||||
h: number;
|
||||
l: number;
|
||||
s: number;
|
||||
};
|
||||
rgb: {a?: number; b: number; g: number; r: number};
|
||||
}) => {
|
||||
this.onChange({
|
||||
hex: color.hex,
|
||||
rgb: {...color.rgb, a: color.rgb.a || 1},
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</Popover>
|
||||
</ColorPickerDescription>
|
||||
@@ -432,7 +446,7 @@ function parseColor(
|
||||
|
||||
// extract alpha if passed AARRGGBB
|
||||
if (val.length === 8) {
|
||||
a = parseInt(parts.shift(), 16) / 255;
|
||||
a = parseInt(parts.shift() || '0', 16) / 255;
|
||||
}
|
||||
|
||||
const size = val.length;
|
||||
|
||||
@@ -1182,6 +1182,13 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.1.tgz#f1a11e7babb0c3cad68100be381d1e064c68f1f6"
|
||||
integrity sha512-CFzn9idOEpHrgdw8JsoTkaDDyRWk1jrzIV8djzcgpq0y9tG4B4lFT+Nxh52DVpDXV+n4+NPNv7M1Dj5uMp6XFg==
|
||||
|
||||
"@types/react-color@^3.0.1":
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-color/-/react-color-3.0.1.tgz#5433e2f503ea0e0831cbc6fd0c20f8157d93add0"
|
||||
integrity sha512-J6mYm43Sid9y+OjZ7NDfJ2VVkeeuTPNVImNFITgQNXodHteKfl/t/5pAR5Z9buodZ2tCctsZjgiMlQOpfntakw==
|
||||
dependencies:
|
||||
"@types/react" "*"
|
||||
|
||||
"@types/react-dom@^16.8.5":
|
||||
version "16.8.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.8.5.tgz#3e3f4d99199391a7fb40aa3a155c8dd99b899cbd"
|
||||
|
||||
Reference in New Issue
Block a user