Skip to content

bendrucker/base-twitter-link

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A basic link to your Twitter

Resources

License

Stars

Watchers

Forks

Packages

No packages published