0.0.1 • Published 6 years ago

palette-command v0.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

PaletteCommand-JS

PaletteCommand like ctrl+shift+p of SublimeText for modern browser

Imgur

Instalation

At the bottom of your html, before end of body.

<script type="application/javascript" src="https://raw.githubusercontent.com/tpoisseau/command-palette.js/master/dist/command-palette.min.js"></script>

And for styling in head tab

<link rel="stylesheet" type="text/css" href="https://github.com/tpoisseau/command-palette.js/blob/master/dist/command-palette.min.css">

You can also use with npm

npm install --save palette-command
import PaletteCommand from 'palette-command';

Basic Usage

const palette = new PaletteCommand();

palette.setCategory([
  {
    name: 'Advanced interactivity',
    description: "It's just for testing",
    action() {
      console.log("Advanced interactivity, It's just for testing");
    }
  }
])

// press ctrl+alt+p and palette appear with one item (Advanced interactivity)

Advanced Usage

You'll found generated JSDOC here :

API

Todo

  • Rich Jsdoc with tutorial