corner-notie
A corner tip utility
Last updated 4 years ago by rem .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install corner-notie 
SYNC missed versions from official npm registry.

corner-notie

NPM version NPM download

A corner tip utility.

Install

Hot-link the IIFE version in your web page directly, CSS is automatically included.

or via NPM:

npm i -S corner-notie

Usage

// if you are using webpack/browserify
import notie from 'corner-notie'

notie('hello world')

// default options
notie('', {
  type: 'info', // info | warning | success | danger
  autoHide: true,
  timeout: 3000,
  position: 'top-right',
  width: 240
})

Positions

top-right | top-left | top-center
bottom-right | bottom-left | bottom-center

Click to hide notie

When autoHide is set to be false, you can click on the notie to hide it. In this way you may not want to hide notie when clicking on a href. Set attribute notie-prevent on that element to prevent from being hidden by clicking there.

notie('hello <a notie-prevent href="/u/egoist">egoist</a>', {
  type: 'success',
  autoHide: false
})

Development

# build for webpack and browser
# run this each time you want to make new release
npm run build
# run gulp for development
npm run dev

License

MIT.

Current Tags

  • 1.2.1                                ...           latest (4 years ago)

8 Versions

  • 1.2.1                                ...           4 years ago
  • 1.2.0                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
  • 0.0.21                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
Maintainers (2)
Downloads
Today 0
This Week 2
This Month 10
Last Day 0
Last Week 6
Last Month 8
Dependencies (0)
None
Dev Dependencies (15)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |