base-twitter-link

1.0.1 • Public • Published

base-twitter-link Build Status

A basic link to your Twitter built with base-element

Install

$ npm install --save base-twitter-link

Usage

var TwitterLink = require('base-twitter-link')
new TwitterLink().toString('bendrucker')
<a href="https://twitter.com/bendrucker" rel="me" title="Follow me on Twitter @bendrucker">@bendrucker</a>

API

new TwitterLink([el]) -> link

el

Type: HTMLElement

The optional HTML element to append to.

link.render(username) -> vdom

username

Required
Type: string / object

Your username. Optionally, pass an object with properties for the <a> element like title to override the defaults.

link.toString(username) -> html

Same signature as link.render, returning an html string instead of vdom.

License

MIT © Ben Drucker

Package Sidebar

Install

npm i base-twitter-link

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • bendrucker