How to use ink-spinner - 2 common examples

To help you get started, we’ve selected a few ink-spinner 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 shakeabi / livcricket / ui.js View on Github external
'use strict';
const React = require('react');
const { useEffect, useState } = require('react');

const fs = require('fs');
const parser = require('xml-parser');
const { parse } = require('node-html-parser');
const execa = require('execa');

const { Text, Color, Box, Static } = require('ink');
const Gradient = require('ink-gradient');
const BigText = require('ink-big-text');
const InkBox = require('ink-box');
const SelectInput = require('ink-select-input').default;
const Spinner = require('ink-spinner').default;
const TextInput = require('ink-text-input').default;

const PropTypes = require('prop-types');
const inspect = require('util').inspect;

const settings = require('./settings.json');

const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));

const App = ({ mode }) => {
	const rss_feed = 'http://static.cricinfo.com/rss/livescores.xml';

	const [loading, setLoading] = useState(true);
	const [matchItems, setMatchItems] = useState([]);
	const [matchSelected, setMatchSelected] = useState(false);
	const [scoreSummary, setScoreSummary] = useState({ score: '', status: '' });
github johno / gatsby-themes / packages / gatsby-ui / ui.js View on Github external
'use strict'

const React = require('react')
const { Component } = require('react')
const { Text, Box, Color } = require('ink')
const SelectInput = require('ink-select-input').default
const Spinner = require('ink-spinner').default
const presets = require('@theme-ui/presets')
const fs = require('fs')
const path = require('path')
const mkdirp = require('mkdirp')

const HARDCODED_TYPES = ['mdxBlogPost', 'mdxNotes']
const HARDCODED_HEADERS = [
	'basic', 'basic-small', 'basic-large', 'basic-inverted'
	//'centered', 'left', 'space-between', 'stretch',
	//'bold', 'sticky', 'hero-scroll', 'social'
]
const HARDCODED_FOOTERS = ['basic', 'basic-border', 'basic-inverted', 'none']

const generateTheme = preset => {
	const name = preset.replace('@theme-ui/preset-', '')

ink-spinner

Spinner component for Ink

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis

Popular ink-spinner functions