sling-web-component-brand-icon
Advanced tools
Comparing version 0.17.0 to 1.3.0
{ | ||
"name": "sling-web-component-brand-icon", | ||
"version": "0.17.0", | ||
"version": "1.3.0", | ||
"description": "", | ||
"main": "dist/cjs/index.js", | ||
"jsnext:main": "dist/es/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"module": "src/index.js", | ||
"main": "dist/cjs/es6/index.js", | ||
"jsnext:main": "dist/es/es6/index.js", | ||
"browser": "dist/iife/es6/index.js", | ||
"author": "Stone Pagamentos", | ||
"dependencies": { | ||
"sling-web-framework": "^0.17.0", | ||
"sling-web-helpers": "^0.17.0" | ||
"sling-framework": "^1.3.0", | ||
"sling-helpers": "^1.3.0" | ||
} | ||
} |
@@ -1,3 +0,56 @@ | ||
# sling-web-component-button | ||
# sling-web-component-brand-icon | ||
The button Component. To use it just add the tag to your index.html. | ||
## Install | ||
``` | ||
npm instal sling-web-component-brand-icon | ||
``` | ||
## Tag | ||
```HTML | ||
<sling-brand-icon></sling-brand-icon> | ||
``` | ||
## Dependencies | ||
* **sling-framework** | ||
* **sling-helpers** | ||
## Attributes and properties | ||
|Name|Type|Default Values|ReflectToAttribute|Observer|callSdk| | ||
|:--|:--|:--|:--:|:--|:--:| | ||
|brandid|Number||:heavy_check_mark:| | ||
|width|Number||:heavy_check_mark:| | ||
|height|Number||:heavy_check_mark:| | ||
### Description | ||
|Name|Description| | ||
|:---|:---| | ||
|brandid |Id that identifies the flag that will be displayed.| | ||
|width|Value that defines the width.| | ||
|height|Value that defines the heigth.| | ||
## Events | ||
This component have no event. | ||
## Examples | ||
All component examples can be emulated using the `npm start sling-web-component-brand-icon` command. | ||
### Use | ||
```HTML | ||
<sling-brand-icon brandid="2" width="50" height="50"></sling-brand-icon> | ||
``` | ||
![image](https://user-images.githubusercontent.com/22959060/45705866-0f67b500-bb51-11e8-8e18-72721604c669.png) | ||
```HTML | ||
<sling-brand-icon brandid="5" width="50" height="50"></sling-brand-icon> | ||
``` | ||
![image](https://user-images.githubusercontent.com/22959060/45706462-b6008580-bb52-11e8-9a58-0811263e7881.png) |
/* eslint-disable */ | ||
import { registerComponent } from 'sling-helpers'; | ||
import { BrandIcon } from './BrandIcon.js'; | ||
// TODO Write me! | ||
registerComponent('sling-brand-icon', BrandIcon); | ||
let $brandIcon | ||
describe('Brand Icon', () => { | ||
beforeEach(() => { | ||
$brandIcon = document.createElement('sling-brand-icon'); | ||
document.body.appendChild($brandIcon); | ||
}); | ||
afterEach(() => { | ||
document.body.removeChild($brandIcon); | ||
$brandIcon = undefined; | ||
}); | ||
it('Should reflect "brandid", "width" and "heigth" attribute to property ', () => { | ||
$brandIcon.setAttribute('brandid', '2'); | ||
$brandIcon.setAttribute('width', 50); | ||
$brandIcon.setAttribute('height', 50); | ||
expect($brandIcon.brandid).to.equal(2) | ||
expect($brandIcon.width).to.equal('50') | ||
expect($brandIcon.height).to.equal('50') | ||
}) | ||
it('Should reflect "brandid", "width" and "heigth" property to attribute ', () => { | ||
$brandIcon.brandid = 3; | ||
$brandIcon.width = 50; | ||
$brandIcon.height = 50; | ||
expect($brandIcon.getAttribute('brandid')).to.equal('3') | ||
expect($brandIcon.getAttribute('width')).to.equal('50') | ||
expect($brandIcon.getAttribute('height')).to.equal('50') | ||
}) | ||
}); | ||
@@ -1,4 +0,4 @@ | ||
import { domHelper } from '../node_modules/sling-web-helpers/src/index.js'; | ||
import { registerComponent } from 'sling-helpers'; | ||
import { BrandIcon } from './component/BrandIcon.js'; | ||
domHelper.registerComponent('sling-brand-icon', BrandIcon); | ||
registerComponent('sling-brand-icon', BrandIcon); |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1075273
16
11561
1
56
1
+ Addedsling-framework@^1.3.0
+ Addedsling-helpers@^1.3.0
+ Addedis-plain-object@2.0.4(transitive)
+ Addedisobject@3.0.1(transitive)
+ Addedmoment@2.30.1(transitive)
+ Addedsling-framework@1.12.5(transitive)
+ Addedsling-helpers@1.12.5(transitive)
+ Addedtimm@1.7.1(transitive)
- Removedsling-web-framework@^0.17.0
- Removedsling-web-helpers@^0.17.0
- Removed@babel/runtime@7.26.0(transitive)
- Removedimask@3.4.0(transitive)
- Removedredux@4.2.1(transitive)
- Removedredux-thunk@2.4.2(transitive)
- Removedregenerator-runtime@0.14.1(transitive)
- Removedsling-web-component-sdk-connect@0.17.0(transitive)
- Removedsling-web-framework@0.17.0(transitive)
- Removedsling-web-helpers@0.17.0(transitive)
- Removedsling-web-sdk@0.17.0(transitive)
- Removedsling-web-storage@0.17.0(transitive)