Skip to content
This repository has been archived by the owner on Jun 10, 2023. It is now read-only.

Commit

Permalink
Require Node.js 8 and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Mar 7, 2019
1 parent 4620dbe commit 54a4cf3
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 24 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ language: node_js
node_js:
- '10'
- '8'
- '6'
9 changes: 6 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@ const Box = props => (
);

Box.propTypes = {
children: PropTypes.any.isRequired,
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node
]).isRequired,
borderColor: PropTypes.string,
borderStyle: PropTypes.oneOfType([
PropTypes.oneOf([
'single',
'double',
'round',
'single-double',
'double-single',
'singleDouble',
'doubleSingle',
'classic'
]),
PropTypes.shape({
Expand Down
26 changes: 14 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ink-box",
"version": "0.1.0",
"description": "Box component for Ink",
"description": "Styled box component for Ink",
"license": "MIT",
"repository": "sindresorhus/ink-box",
"author": {
Expand All @@ -11,7 +11,7 @@
},
"main": "dist.js",
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"build": "babel index.js --out-file=dist.js",
Expand All @@ -38,22 +38,27 @@
"command-line"
],
"dependencies": {
"boxen": "^1.3.0",
"prop-types": "^15.6.1"
"boxen": "^3.0.0",
"prop-types": "^15.7.2"
},
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.3.3",
"@babel/preset-react": "^7.0.0",
"ava": "*",
"ava": "^1.3.1",
"clear-module": "^3.1.0",
"eslint-config-xo-react": "^0.16.0",
"eslint-plugin-react": "^7.7.0",
"eslint-config-xo-react": "^0.19.0",
"eslint-plugin-react": "^7.12.4",
"eslint-plugin-react-hooks": "^1.4.0",
"ink": "^2.0.0",
"ink-testing-library": "^1.0.0",
"react": "^16.8.2",
"strip-ansi": "^4.0.0",
"xo": "*"
"strip-ansi": "^5.0.0",
"xo": "^0.24.0"
},
"peerDependencies": {
"ink": ">=2.0.0",
"react": ">=16.8.0"
},
"babel": {
"presets": [
Expand All @@ -65,9 +70,6 @@
"extends": [
"xo-react"
],
"ignores": [
"dist.js"
],
"rules": {
"react/require-default-props": "off",
"react/no-unused-prop-types": "off"
Expand Down
13 changes: 6 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ink-box [![Build Status](https://travis-ci.org/sindresorhus/ink-box.svg?branch=master)](https://travis-ci.org/sindresorhus/ink-box)

> Box component for [Ink](https://github.com/vadimdemedes/ink)
> Styled box component for [Ink](https://github.com/vadimdemedes/ink)
![](screenshot.png)

Expand All @@ -15,15 +15,14 @@ $ npm install ink-box
## Usage

```js
import {h, render, Color} from 'ink';
import React from 'react';
import {render, Color} from 'ink';
import Box from 'ink-box';

render(
<div>
<Box borderStyle="round" borderColor="cyan" float="center" padding={1}>
I Love <Color magenta>Unicorns</Color>
</Box>
</div>
<Box borderStyle="round" borderColor="cyan" float="center" padding={1}>
I Love <Color magenta>Unicorns</Color>
</Box>
);
```

Expand Down
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {serial as test} from 'ava';
import React from 'react';
import {Color} from 'ink';
import {render} from 'ink-testing-library';
import clearModule from 'clear-module';
Expand Down

0 comments on commit 54a4cf3

Please sign in to comment.