How to use the figures.arrowDown 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 neo-one-suite / neo-one / packages / neo-one-server-plugin / src / handleCLITaskList.ts View on Github external
import cliTruncate from 'cli-truncate';
import figures from 'figures';
import * as logSymbols from 'log-symbols';
import logUpdate from 'log-update';
import ora from 'ora';
import { EMPTY, Observable, Subject, timer } from 'rxjs';
import { map, switchMap } from 'rxjs/operators';
import { indentString, stripAnsi } from './displayUtils';
import { areTasksDone, getTasksError } from './tasks';
import { InteractiveCLI, TaskStatus } from './types';

// tslint:disable-next-line no-any
type Spinners = any;

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

const getSymbol = (task: TaskStatus, mutableSpinners: Spinners) => {
  if (mutableSpinners[task.id] == undefined) {
    const spinner = ora({ color: 'yellow' });
    mutableSpinners[task.id] = spinner;
  }

  const hasSubtasks = task.subtasks !== undefined && task.subtasks.length > 0;
  if (task.pending) {
    return hasSubtasks ? pointer : chalk.yellow(mutableSpinners[task.id].frame().trim());
  }

  if (task.complete) {
    return logSymbols.success;
  }
github nikersify / jay / source / cli.ts View on Github external
continue
				}

				console.error(error)
				continue
			}

			if (answer) {
				const installed = await moduler.install(
					pack.name,
					pack.version
				)

				console.log(c.blue(
					figures.arrowDown,
					c.bold(pack.name + (pack.version ?
						c.gray.bold('@' + pack.version) : '')
					),
					'installed',
					installed ?
						`in ${Math.round(installed.elapsed * 10000) / 10000000}s!` :
						'!'
				) + '\n')
			}
		} else {
			const loc =	resolved.location === 'global cache' ?
				'jay\'s cache' :
				resolved.location

			console.log(
				c.green(
github JonnyBurger / make-space / src / components / main.js View on Github external
{' '.repeat(2)}
					You can save up to{' '}
					{this.doneSearching ? null : (
						
							{' '}
						
					)}
					{prettyBytes(this.totalPotential)}.
				

				<div>
					<span>
						{' '.repeat(2)}
						{this.doneSearching ? (
							
								({figures.arrowDown} {figures.arrowUp}) Move up / down
								{' '.repeat(6)}
								(space) Select item
								{' '.repeat(6)}
								(d) Show {this.state.mode === 'docs' ? 'commands' : 'docs'}
								{' '.repeat(6)}
								(enter) Execute
							
						) : (
							<span>
								Press s to stop searching.
							</span>
						)}
					</span>
				</div>
				<div>
				<div></div></div>
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 neo-one-suite / neo-one / packages / neo-one-cli / src / interactive / createCRUD.js View on Github external
getTasksError,
  areTasksDone,
} from '@neo-one/server-plugin';

import chalk from 'chalk';
import cliTruncate from 'cli-truncate';
import elegantSpinner from 'elegant-spinner';
import figures from 'figures';
import indentString from 'indent-string';
import logSymbols from 'log-symbols';
import { map, switchMap, take } from 'rxjs/operators';
import stripAnsi from 'strip-ansi';
import logUpdate from 'log-update';

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

const addCommonResource = ({
  cli,
  command,
  crud,
}: {|
  cli: InteractiveCLI,
  command: Command,
  crud: CRUDResourceBase&lt;*, *&gt;,
|}) =&gt; {
  command.autocomplete({
    data: async () =&gt; crud.getCLIAutocomplete({ cli }),
  });
};

const addCommon = ({
github keindev / tasktree / src / theme.ts View on Github external
const symbol = Theme.getValueBy(symbols, type, (): string => {
            if (type === IndicationType.Active) return frame();
            if (type === IndicationType.Success) return Figures.tick;
            if (type === IndicationType.Skip) return Figures.arrowDown;
            if (type === IndicationType.Error) return Figures.cross;
            if (type === IndicationType.Message) return Figures.line;
            if (type === IndicationType.Info) return Figures.info;
            if (type === IndicationType.Warning) return Figures.warning;
            if (type === IndicationType.Subtask) return Figures.pointerSmall;
            if (type === IndicationType.List) return Figures.pointer;

            return symbols.get(IndicationType.Default) || this.symbol(IndicationType.Subtask);
        });
github SamVerschueren / listr-update-renderer / lib / utils.js View on Github external
'use strict';
const chalk = require('chalk');
const logSymbols = require('log-symbols');
const figures = require('figures');
const elegantSpinner = require('elegant-spinner');

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

exports.isDefined = x => x !== null && x !== undefined;

exports.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;
	}