@cloudflare/component-icon
Advanced tools
Comparing version 2.2.7 to 2.3.0
@@ -6,2 +6,13 @@ # Change Log | ||
<a name="2.3.0"></a> | ||
# [2.3.0](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-icon@2.2.7...@cloudflare/component-icon@2.3.0) (2018-12-21) | ||
### Features | ||
* **component-icon:** LOUI-280 Add nearBlack color option ([a7647b9](http://stash.cfops.it:7999/fe/stratus/commits/a7647b9)) | ||
<a name="2.2.7"></a> | ||
@@ -15,3 +26,3 @@ ## [2.2.7](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-icon@2.2.6...@cloudflare/component-icon@2.2.7) (2018-12-15) | ||
<a name="2.2.6"></a> | ||
<a name="2.2.6"></a> | ||
## [2.2.6](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-icon@2.2.5...@cloudflare/component-icon@2.2.6) (2018-12-14) | ||
@@ -24,3 +35,3 @@ | ||
<a name="2.2.5"></a> | ||
<a name="2.2.5"></a> | ||
## [2.2.5](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-icon@2.2.4...@cloudflare/component-icon@2.2.5) (2018-11-27) | ||
@@ -33,3 +44,3 @@ | ||
<a name="2.2.4"></a> | ||
<a name="2.2.4"></a> | ||
## [2.2.4](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-icon@2.2.3...@cloudflare/component-icon@2.2.4) (2018-11-21) | ||
@@ -36,0 +47,0 @@ |
@@ -66,38 +66,30 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var getFill = function getFill(color, theme) { | ||
var fill; | ||
switch (color) { | ||
case 'default': | ||
fill = theme.colors.gray[4]; | ||
break; | ||
return theme.colors.gray[4]; | ||
case 'primary': | ||
fill = theme.colors.blue[4]; | ||
break; | ||
return theme.colors.blue[4]; | ||
case 'success': | ||
fill = theme.colors.green[6]; | ||
break; | ||
return theme.colors.green[6]; | ||
case 'warning': | ||
fill = theme.colors.orange[5]; | ||
break; | ||
return theme.colors.orange[5]; | ||
case 'danger': | ||
fill = theme.colors.red[3]; | ||
break; | ||
return theme.colors.red[3]; | ||
case 'black': | ||
fill = theme.colors.black; | ||
break; | ||
return theme.colors.black; | ||
case 'white': | ||
fill = theme.colors.white; | ||
break; | ||
return theme.colors.white; | ||
case 'nearBlack': | ||
return theme.colors.gray[1]; | ||
default: | ||
fill = theme.colors.black; | ||
return theme.colors.black; | ||
} | ||
return fill; | ||
}; | ||
@@ -147,3 +139,3 @@ | ||
type: PropTypes.oneOf(iconTypes).isRequired, | ||
color: PropTypes.oneOf(['default', 'primary', 'success', 'warning', 'danger', 'black', 'white']), | ||
color: PropTypes.oneOf(['default', 'primary', 'success', 'warning', 'danger', 'black', 'white', 'nearBlack']), | ||
size: PropTypes.oneOf(['1.2x', '1.5x', '2x', '2.5x', '3x', '3.5x', '4x']) | ||
@@ -150,0 +142,0 @@ }; |
@@ -80,38 +80,30 @@ "use strict"; | ||
var getFill = function getFill(color, theme) { | ||
var fill; | ||
switch (color) { | ||
case 'default': | ||
fill = theme.colors.gray[4]; | ||
break; | ||
return theme.colors.gray[4]; | ||
case 'primary': | ||
fill = theme.colors.blue[4]; | ||
break; | ||
return theme.colors.blue[4]; | ||
case 'success': | ||
fill = theme.colors.green[6]; | ||
break; | ||
return theme.colors.green[6]; | ||
case 'warning': | ||
fill = theme.colors.orange[5]; | ||
break; | ||
return theme.colors.orange[5]; | ||
case 'danger': | ||
fill = theme.colors.red[3]; | ||
break; | ||
return theme.colors.red[3]; | ||
case 'black': | ||
fill = theme.colors.black; | ||
break; | ||
return theme.colors.black; | ||
case 'white': | ||
fill = theme.colors.white; | ||
break; | ||
return theme.colors.white; | ||
case 'nearBlack': | ||
return theme.colors.gray[1]; | ||
default: | ||
fill = theme.colors.black; | ||
return theme.colors.black; | ||
} | ||
return fill; | ||
}; | ||
@@ -161,3 +153,3 @@ | ||
type: _propTypes.default.oneOf(_iconTypes.default).isRequired, | ||
color: _propTypes.default.oneOf(['default', 'primary', 'success', 'warning', 'danger', 'black', 'white']), | ||
color: _propTypes.default.oneOf(['default', 'primary', 'success', 'warning', 'danger', 'black', 'white', 'nearBlack']), | ||
size: _propTypes.default.oneOf(['1.2x', '1.5x', '2x', '2.5x', '3x', '3.5x', '4x']) | ||
@@ -164,0 +156,0 @@ }; |
{ | ||
"name": "@cloudflare/component-icon", | ||
"description": "Cloudflare Icon Component", | ||
"version": "2.2.7", | ||
"version": "2.3.0", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "module": "es/index.js", |
@@ -41,29 +41,22 @@ import React from 'react'; | ||
const getFill = (color, theme) => { | ||
let fill; | ||
switch (color) { | ||
case 'default': | ||
fill = theme.colors.gray[4]; | ||
break; | ||
return theme.colors.gray[4]; | ||
case 'primary': | ||
fill = theme.colors.blue[4]; | ||
break; | ||
return theme.colors.blue[4]; | ||
case 'success': | ||
fill = theme.colors.green[6]; | ||
break; | ||
return theme.colors.green[6]; | ||
case 'warning': | ||
fill = theme.colors.orange[5]; | ||
break; | ||
return theme.colors.orange[5]; | ||
case 'danger': | ||
fill = theme.colors.red[3]; | ||
break; | ||
return theme.colors.red[3]; | ||
case 'black': | ||
fill = theme.colors.black; | ||
break; | ||
return theme.colors.black; | ||
case 'white': | ||
fill = theme.colors.white; | ||
break; | ||
return theme.colors.white; | ||
case 'nearBlack': | ||
return theme.colors.gray[1]; | ||
default: | ||
fill = theme.colors.black; | ||
return theme.colors.black; | ||
} | ||
return fill; | ||
}; | ||
@@ -99,3 +92,4 @@ | ||
'black', | ||
'white' | ||
'white', | ||
'nearBlack' | ||
]), | ||
@@ -102,0 +96,0 @@ |
243754
5020