Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

ak-button

Package Overview
Dependencies
9
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ak-button

ak-button webcomponent


Version published
Weekly downloads
413
decreased by-47.85%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Button

Synopsis

A button implementation to handle user events.

Setup and install

npm install ak-button

Using the component

HTML

This package exports the ak-button skate component. Import the component in your JS resource:

bundle.js
import AkButton from 'ak-button';

Now we can use the defined tag in our HTML markup, e.g.:

index.html
<html>
<head>
  <script src="bundle.js"></script>
</head>
<body>
  <!-- ... -->
  <ak-button>testing</ak-button>
</body>

React

import AkButton from 'ak-button';
import reactify from 'skatejs-react-integration';

const ReactComponent = reactify(AkButton, {});

ReactDOM.render(<ReactComponent />, container);

Vanilla JS

It can be used as a Constructor:

import AkButton from 'ak-button';
const myButton = new AkButton();
myButton.innerHTML = 'testing' // renders <ak-button>testing</ak-button>
document.body.appendChild(myButton) // Needed to be attached to the DOM to be rendered

Or nested inside skate elements, e.g.:

import 'ak-button';
const { vdom, define } = skate;
const { element } = vdom;

const MyButton = define('my-elem', {
  render() {
    element('ak-button', () => {
      vdom.text('My Button');
    });
  }
});

document.body.appendChild(new MyButton())  // renders <ak-button>My Button</ak-button>

FAQs

Last updated on 22 Aug 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc