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

sling-web-component-brand-icon

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sling-web-component-brand-icon - npm Package Compare versions

Comparing version 0.17.0 to 1.3.0

dist/cjs/es5/component/BrandIcon.js

15

package.json
{
"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);
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