1.0.1 • Published 7 months ago

@inkkit/ink-divider v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

ink-divider

Divider component for Ink 4

Refactored version of Jure's ink-divider

Install

$ npm install @inkkit/ink-divider

Usage

import React from "react";
import { render } from "ink";
import Divider from "@inkkit/ink-divider";

const Demo = () => {
  return <Divider title="Title" />;
};

render(<Demo />);

Props

title

Type: string Default: ""

Title shown in the middle of the divider.

width

Type: number Default: 50

Width of the divider.

padding

Type: number Default: 1

Padding at the start and the end of the divider.

titlePadding

Type: number Default: 1

Padding besides the title in the middle.

titleColor

Type: string Default: "white"

Color of the title.

Takes the same values as <Text> color property.

dividerChar

Type: string Default: "-"

Char used as a divider.

dividerColor

Type: string Default: "gray"

Color of the divider chars.

Takes the same values as <Text> color property.

1.0.1

7 months ago

1.0.0

7 months ago