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

clay-icon

Package Overview
Dependencies
Maintainers
4
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clay-icon - npm Package Compare versions

Comparing version 1.0.0-alpha.2 to 1.0.0-alpha.3

src/ClayIcon.soy.js

9

package.json
{
"name": "clay-icon",
"version": "1.0.0-alpha.2",
"version": "1.0.0-alpha.3",
"description": "Clay Icon Component",

@@ -28,5 +28,6 @@ "license": "BSD",

"dependencies": {
"metal-component": "^2.13.2",
"metal-soy": "^2.13.2",
"metal-state": "^2.13.2"
"metal-component": "^2.14.0",
"metal-soy": "^2.14.0",
"metal-state": "^2.14.0",
"metal-web-component": "^2.14.0"
},

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

@@ -8,26 +8,26 @@ import ClayIcon from '../ClayIcon';

describe('ClayIcon', function() {
afterEach(() => {
if (clayIcon) {
clayIcon.dispose();
}
});
afterEach(() => {
if (clayIcon) {
clayIcon.dispose();
}
});
it('should generate markup for icon `add-cell`', () => {
clayIcon = new ClayIcon({
spritemap: spritemap,
symbol: 'add-cell',
});
it('should generate markup for icon `add-cell`', () => {
clayIcon = new ClayIcon({
spritemap: spritemap,
symbol: 'add-cell',
});
expect(clayIcon).toMatchSnapshot();
});
expect(clayIcon).toMatchSnapshot();
});
it('should render a `add-cell` icon with id', () => {
clayIcon = new ClayIcon({
id: 'myIcon',
spritemap: spritemap,
symbol: 'add-cell',
});
it('should render a `add-cell` icon with id', () => {
clayIcon = new ClayIcon({
id: 'myIcon',
spritemap: spritemap,
symbol: 'add-cell',
});
expect(clayIcon).toMatchSnapshot();
});
expect(clayIcon).toMatchSnapshot();
});
});
import Component from 'metal-component';
import defineWebComponent from 'metal-web-component';
import Soy from 'metal-soy';

@@ -18,30 +19,41 @@ import {Config} from 'metal-state';

ClayIcon.STATE = {
/**
* Id to be applied to the element.
* @instance
* @memberof ClayButton
* @type {?string|undefined}
* @default undefined
*/
id: Config.string(),
/**
* CSS classes to be applied to the element.
* @instance
* @memberof ClayIcon
* @type {?string}
* @default undefined
*/
elementClasses: Config.string(),
/**
* The path to the SVG spritemap file containing the icons.
* @instance
* @memberof ClayIcon
* @type {!string}
* @default undefined
*/
spritemap: Config.string().required(),
/**
* Id to be applied to the element.
* @instance
* @memberof ClayIcon
* @type {?string|undefined}
* @default undefined
*/
id: Config.string(),
/**
* The name of the Clay SVG Icon e.g. `plus`.
* @instance
* @memberof ClayIcon
* @type {!string}
* @default undefined
*/
symbol: Config.string().required(),
/**
* The path to the SVG spritemap file containing the icons.
* @instance
* @memberof ClayIcon
* @type {!string}
* @default undefined
*/
spritemap: Config.string().required(),
/**
* The name of the Clay SVG Icon e.g. `plus`.
* @instance
* @memberof ClayIcon
* @type {!string}
* @default undefined
*/
symbol: Config.string().required(),
};
defineWebComponent('clay-icon', ClayIcon);
Soy.register(ClayIcon, templates);

@@ -48,0 +60,0 @@

Sorry, the diff of this file is not supported yet

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