Nervous Penpal Message

    fa-tool
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.8 • Public • Published

    fa-tool

    npm install fa-tool
    

    text format:

    • front
    • back---front
    • back---front---x

    explaination:

    • size, pull on back will be ignored.
    • size, pull on front will apply to the whole stack.
    • ---, ------ are the same, but must have length more than 3.
    • back/front icon always starts with its name.
    • back/front icon always join its attributes using --.
    • ---x will xchange back/front position.

    accepted icon attributes:

    size: ['lg', '2x', '3x', '4x', '5x'];
    color: ['muted', 'primary', 'success', 'info', 'warning', 'danger'];
    pull: ['left', 'right'];
    direction: [90, 180, 270];
    flip: ['h', 'v'];

    basic usage

    var fa = require('fa-tool');
    fa.render('ban');
    <i class="fa fa-ban"></i>
    var fa = require('fa-tool');
    fa.render('ban--danger---camera--success--lg');
    <span class="fa-stack fa-lg">
      <i class="fa fa-ban text-danger fa-stack-2x"></i>
      <i class="fa fa-camera text-success fa-stack-1x"></i>
    </span>
    var fa = require('fa-tool');
    fa.render('ban---camera---x');
    <span class="fa-stack">
      <i class="fa fa-camera fa-stack-1x"></i>
      <i class="fa fa-ban fa-stack-2x"></i>
    </span>
    var fa = require('fa-tool');
    fa.render('ban--90--v--danger-----camera--lg--left--180--h--success-----x');
    <span class="fa-lg fa-pull-left fa-stack">
      <i class="fa fa-camera fa-flip-horizontal fa-rotate-180 fa-stack-1x text-success"></i>
      <i class="fa fa-ban fa-flip-vertical fa-rotate-90 fa-stack-2x text-danger"></i>
    </span>

    5.for markdown-it

    var MarkdownIt = require('markdown-it');
    var md = MarkdownIt().use(require('fa-tool/dist/markdown-it-plugin'));
    md.render(':fa-ban---camera--lg:')
    <span class="fa-stack fa-lg">
      <i class="fa fa-ban fa-stack-2x"></i>
      <i class="fa fa-camera fa-stack-1x"></i>
    </span>
    var fa = require('fa-tool');
    var stackFa = fa.parse('ban----camera-----x');
    stackFa.render(); // same as fa.render('ban---camera---x')
    stackFa.text():   // ban---camera---x

    Install

    npm i fa-tool

    DownloadsWeekly Downloads

    0

    Version

    0.0.8

    License

    MIT

    Last publish

    Collaborators

    • empirefoxit