Comparing version 1.0.0-alpha.2 to 1.0.0-alpha.3
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9761
8
152
4
+ Addedmetal-web-component@^2.14.0
+ Addedmetal-state@2.7.0(transitive)
+ Addedmetal-web-component@2.16.8(transitive)
Updatedmetal-component@^2.14.0
Updatedmetal-soy@^2.14.0
Updatedmetal-state@^2.14.0