ink-spinner
Advanced tools
Comparing version 1.0.0 to 2.0.0
'use strict'; | ||
const { h, Text, Component } = require('ink'); | ||
const { h, Color, Component } = require('ink'); | ||
const PropTypes = require('prop-types'); | ||
@@ -24,8 +24,8 @@ const spinners = require('cli-spinners'); | ||
render(props, { frame }) { | ||
const textProps = omit(props, 'type'); | ||
const colorProps = omit(props, 'type'); | ||
const spinner = this.getSpinner(); | ||
return h( | ||
Text, | ||
textProps, | ||
Color, | ||
colorProps, | ||
spinner.frames[frame] | ||
@@ -32,0 +32,0 @@ ); |
{ | ||
"name": "ink-spinner", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Spinner component for Ink", | ||
@@ -35,2 +35,5 @@ "license": "MIT", | ||
], | ||
"peerDependencies": { | ||
"ink": "^0.5.0" | ||
}, | ||
"dependencies": { | ||
@@ -47,3 +50,3 @@ "cli-spinners": "^1.0.0", | ||
"eslint-plugin-react": "^7.1.0", | ||
"ink": "^0.2.1", | ||
"ink": "^0.5.0", | ||
"sinon": "^2.3.6", | ||
@@ -50,0 +53,0 @@ "xo": "^0.18.2" |
@@ -26,3 +26,3 @@ # ink-spinner [![Build Status](https://travis-ci.org/vadimdemedes/ink-spinner.svg?branch=master)](https://travis-ci.org/vadimdemedes/ink-spinner) | ||
<img src="media/demo.gif" width="258"/> | ||
<img src="media/demo.gif" width="482"> | ||
@@ -32,3 +32,3 @@ | ||
All props except the own ones listed below are passed as-is to `<Text>`, which means you can easily apply any color, without wrapping `<Spinner>` in `<Text>` manually. | ||
All props except the own ones listed below are passed as-is to `<Color>`, which means you can easily apply any color, without wrapping `<Spinner>` in `<Color>` manually. | ||
@@ -35,0 +35,0 @@ ### type |
4716
4