How to use the figures.pointer function in figures

To help you get started, we’ve selected a few figures examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Yoctol / bottender / packages / bottender / src / shared / __tests__ / log.spec.ts View on Github external
it('print', () => {
    print('print!');
    expect(console.log).toBeCalledWith(
      `${chalk.green(figures.pointer)} print!`
    );
  });
github Financial-Times / origami-build-tools / lib / helpers / listr-renderer.js View on Github external
'use strict';

const isCI = require('is-ci');
const chalk = require('chalk');
const logSymbols = require('log-symbols');
const figures = require('figures');
const elegantSpinner = require('elegant-spinner');
const logUpdate = require('log-update');
const indentString = require('indent-string');

const pointer = chalk.yellow(figures.pointer);
const skipped = chalk.yellow(figures.arrowDown);

const isDefined = x => x !== null && x !== undefined;

const getSymbol = (task, options) => {
	if (!task.spinner) {
		task.spinner = elegantSpinner();
	}

	if (task.isPending()) {
		return options.showSubtasks !== false && task.subtasks.length > 0 ? pointer : chalk.yellow(task.spinner());
	}

	if (task.isCompleted()) {
		return logSymbols.success;
	}
github SBoudrias / Inquirer.js / packages / inquirer / lib / prompts / checkbox.js View on Github external
choices.forEach(function(choice, i) {
    if (choice.type === 'separator') {
      separatorOffset++;
      output += ' ' + choice + '\n';
      return;
    }

    if (choice.disabled) {
      separatorOffset++;
      output += ' - ' + choice.name;
      output += ' (' + (_.isString(choice.disabled) ? choice.disabled : 'Disabled') + ')';
    } else {
      var line = getCheckbox(choice.checked) + ' ' + choice.name;
      if (i - separatorOffset === pointer) {
        output += chalk.cyan(figures.pointer + line);
      } else {
        output += ' ' + line;
      }
    }

    output += '\n';
  });
github enquirer / enquirer / examples / plugins / autocomplete.js View on Github external
choices.forEach(function(choice, i) {
    if (choice.type === 'separator') {
      separatorOffset++;
      output += '  ' + choice + '\n';
      return;
    }

    var isSelected = (i - separatorOffset === pointer);
    var line = (isSelected ? figures.pointer + ' ' : '  ') + choice.name;

    if (isSelected) {
      line = log.cyan(line);
    }
    output += line + ' \n';
  });
github nicksrandall / inquirer-directory / index.js View on Github external
choices.forEach(function (choice, i) {
    if (choice.type === 'separator') {
      separatorOffset++;
      output += '  ' + choice + '\n';
      return;
    }

    var isSelected = (i - separatorOffset === pointer);
    var line = (isSelected ? figures.pointer + ' ' : '  ') + choice.name;
    if (isSelected) {
      line = chalk.cyan(line);
    }
    output += line + ' \n';
  });
github makuga01 / dnsFookup / FE / node_modules / inquirer / lib / prompts / checkbox.js View on Github external
choices.forEach(function (choice, i) {
    if (choice.type === 'separator') {
      separatorOffset++;
      output += ' ' + choice + '\n';
      return;
    }

    if (choice.disabled) {
      separatorOffset++;
      output += ' - ' + choice.name;
      output += ' (' + (_.isString(choice.disabled) ? choice.disabled : 'Disabled') + ')';
    } else {
      var line = getCheckbox(choice.checked) + ' ' + choice.name;
      if (i - separatorOffset === pointer) {
        output += chalk.cyan(figures.pointer + line);
      } else {
        output += ' ' + line;
      }
    }

    output += '\n';
  });
github mokkabonna / inquirer-autocomplete-prompt / index.js View on Github external
choices.forEach(function(choice, i) {
    if (choice.type === 'separator') {
      separatorOffset++;
      output += '  ' + choice + '\n';
      return;
    }

    var isSelected = i - separatorOffset === pointer;
    var line = (isSelected ? figures.pointer + ' ' : '  ') + choice.name;

    if (isSelected) {
      line = chalk.cyan(line);
    }
    output += line + ' \n';
  });
github aragon / aragon-cli / packages / cli / src / reporters / ReporterIcons.js View on Github external
import chalk from 'chalk'
import figures from 'figures'

export const DEBUG_ICON = chalk.magenta(figures.pointer)
export const INFO_ICON = chalk.blue(figures.info)
export const WARNING_ICON = chalk.yellow(figures.warning)
export const ERROR_ICON = chalk.red(figures.cross)
export const SUCCESS_ICON = chalk.green(figures.tick)
github SUI-Components / sui / packages / sui-helpers / cli.js View on Github external
function parallelSpawn(commands, options = {}) {
  const symbol = figures.pointer + figures.pointer
  commands = commands.map(([bin, args, opts]) => [
    bin,
    args,
    Object.assign({}, opts, options)
  ])

  log(`${symbol} Running ${commands.length} commands in parallel.`.cyan)
  return spawnList(commands, {concurrent: true})
    .then(() => log(`${commands.length} commands run successfully.`.green))
    .catch(showError)
}
github makuga01 / dnsFookup / FE / node_modules / inquirer / lib / prompts / list.js View on Github external
if (choice.type === 'separator') {
      separatorOffset++;
      output += '  ' + choice + '\n';
      return;
    }

    if (choice.disabled) {
      separatorOffset++;
      output += '  - ' + choice.name;
      output += ' (' + (_.isString(choice.disabled) ? choice.disabled : 'Disabled') + ')';
      output += '\n';
      return;
    }

    var isSelected = i - separatorOffset === pointer;
    var line = (isSelected ? figures.pointer + ' ' : '  ') + choice.name;
    if (isSelected) {
      line = chalk.cyan(line);
    }

    output += line + ' \n';
  });