Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grommet-icon-loader

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grommet-icon-loader - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

6

lib/index.js

@@ -42,3 +42,3 @@ 'use strict';

// convert hyphens to camelcase
if (key.indexOf('-') > -1) return (0, _parsers.hyphenToCamel)(key);
if (key.indexOf('-') > -1) return (0, _camelCase2.default)(key);
return true;

@@ -92,4 +92,6 @@ }

var _parsers = require('./parsers');
var _camelCase = require('camel-case');
var _camelCase2 = _interopRequireDefault(_camelCase);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -96,0 +98,0 @@

@@ -1,2 +0,2 @@

"use strict";
'use strict';

@@ -8,5 +8,13 @@ Object.defineProperty(exports, "__esModule", {

exports.default = function (resolve) {
return resolve.copyright + "\n\nimport React, { PropTypes } from 'react';\nimport classnames from 'classnames';\nimport FormattedMessage from '" + resolve.context + "components/FormattedMessage';\n\nconst CLASS_ROOT = 'control-icon';\n\nconst Icon = props => {\n let { a11yTitle, a11yTitleId, className, colorIndex, large, size } = props;\n\n if (!size && large) {\n size = 'large';\n }\n\n let classes = classnames(\n CLASS_ROOT,\n `${CLASS_ROOT}-" + resolve.fileName + "`,\n className,\n {\n [`${CLASS_ROOT}--${size}`]: size,\n [`color-index-${colorIndex}`]: colorIndex\n }\n );\n\n let titleLabel = a11yTitle || '" + resolve.fileName + "';\n a11yTitle = <FormattedMessage id={titleLabel} defaultMessage={titleLabel} />;\n\n return " + resolve.svg + ";\n};\n\nIcon.propTypes = {\n a11yTitle: PropTypes.string,\n a11yTitleId: PropTypes.string,\n colorIndex: PropTypes.string,\n large: PropTypes.bool,\n size: PropTypes.oneOf(['small', 'medium', 'large'])\n};\n\nIcon.defaultProps = {\n a11yTitleId: '" + resolve.fileName + "-title'\n};\n\nIcon.icon = true;\n\nexport default Icon;\n";
return resolve.copyright + '\n\nimport React, { PropTypes } from \'react\';\nimport classnames from \'classnames\';\nimport FormattedMessage from \'' + resolve.context + 'components/FormattedMessage\';\n\nconst CLASS_ROOT = \'control-icon\';\n\nconst Icon = props => {\n let { a11yTitle, a11yTitleId, className, colorIndex, large, size } = props;\n\n if (!size && large) {\n size = \'large\';\n }\n\n let classes = classnames(\n CLASS_ROOT,\n `${CLASS_ROOT}-' + resolve.fileName + '`,\n className,\n {\n [`${CLASS_ROOT}--${size}`]: size,\n [`color-index-${colorIndex}`]: colorIndex\n }\n );\n\n let titleLabel = a11yTitle || \'' + resolve.fileName + '\';\n a11yTitle = <FormattedMessage id={titleLabel} defaultMessage={titleLabel} />;\n\n return ' + resolve.svg + ';\n};\n\nIcon.propTypes = {\n a11yTitle: PropTypes.string,\n a11yTitleId: PropTypes.string,\n colorIndex: PropTypes.string,\n large: PropTypes.bool,\n size: PropTypes.oneOf([\'small\', \'medium\', \'large\', \'huge\'])\n};\n\nIcon.defaultProps = {\n a11yTitleId: \'' + resolve.fileName + '-title\'\n};\n\nIcon.icon = true;\n\nIcon.displayName = \'' + (0, _pascalCase2.default)(resolve.fileName) + '\';\n\nexport default Icon;\n';
};
; // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
var _pascalCase = require('pascal-case');
var _pascalCase2 = _interopRequireDefault(_pascalCase);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
;
{
"name": "grommet-icon-loader",
"version": "0.2.6",
"version": "0.2.7",
"description": "Loads svg icons as a react component in Grommet",

@@ -28,6 +28,8 @@ "main": "lib/index.js",

"dependencies": {
"camel-case": "^1.2.2",
"loader-utils": "^0.2.11",
"pascal-case": "^1.1.2",
"xml2js": "~0.4.9",
"xmlbuilder": "~2.6.4",
"yargs": "~3.18.0",
"loader-utils": "^0.2.11"
"yargs": "~3.18.0"
},

@@ -34,0 +36,0 @@ "devDependencies": {

@@ -10,3 +10,3 @@ // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP

import makeComponent from './make-component';
import {hyphenToCamel} from './parsers';
import camelCase from 'camel-case';

@@ -47,3 +47,3 @@ export default function(content) {

// convert hyphens to camelcase
if (key.indexOf('-') > -1) return hyphenToCamel(key);
if (key.indexOf('-') > -1) return camelCase(key);
return true;

@@ -50,0 +50,0 @@ }

// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import pascalCase from 'pascal-case';
export default function(resolve) {

@@ -40,3 +42,3 @@ return `${resolve.copyright}

large: PropTypes.bool,
size: PropTypes.oneOf(['small', 'medium', 'large'])
size: PropTypes.oneOf(['small', 'medium', 'large', 'huge'])
};

@@ -50,2 +52,4 @@

Icon.displayName = '${pascalCase(resolve.fileName)}';
export default Icon;

@@ -52,0 +56,0 @@ `;

@@ -61,3 +61,3 @@ // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP

large: PropTypes.bool,
size: PropTypes.oneOf(['small', 'medium', 'large'])
size: PropTypes.oneOf(['small', 'medium', 'large', 'huge'])
};

@@ -71,2 +71,4 @@

Icon.displayName = 'Add';
export default Icon;

@@ -73,0 +75,0 @@ `;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc