Socket
Socket
Sign inDemoInstall

@lab49/react-order-book

Package Overview
Dependencies
8
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.1.1

52

dist/OrderBook.d.ts

@@ -13,13 +13,49 @@ /// <reference types="react" />

export interface Props {
/**
* For the internaly calculated colors, apply a background-color in the DOM.
*/
applyBackgroundColor?: boolean;
/**
* Base color for the asks list.
*/
askColor?: RgbColor;
/**
* Base color for the bids list.
*/
bidColor?: RgbColor;
/**
* Order book object.
*/
book: OrderBook;
/**
* Use a value of 1 for the opacity of each row's generated color.
*/
fullOpacity?: boolean;
/**
* Color interpolator function.
*/
interpolateColor?: Interpolator;
/**
* Various layout options.
*/
layout?: Layout;
/**
* Limit the length of the rendered bids and asks.
*/
listLength?: number;
/**
* Show column headers.
*/
showHeaders?: boolean;
/**
* Show the spread.
*/
showSpread?: boolean;
/**
* Provide a custom spread value instead of letting OrderBook calculate it.
*/
spread?: string;
/**
* Prefix for the CSS class name in the DOM.
*/
stylePrefix?: string;

@@ -35,10 +71,12 @@ }

*
* `react-order-book` is a simple, flexible order book rendering component.
* Pass in an order book as a prop, and cutomize the look and feel with plenty
* of configuration props, plus numerous styling hooks for visual customization.
* `react-order-book` is a simple, flexible order book component.
* Pass in an order book as a prop, and cutomize the look and feel
* with plenty of configuration options, plus numerous styling hooks
* for visual customization.
*
* `react-order-book` tries to be extremely unopinionated about styling,
* and as such, includes very little actual style rules. There's plenty of
* examples in the included demo website that show how you can use the
* rendered class names to create your own beautiful experiences.
* `react-order-book` tries to be extremely unopinionated about
* styling, and as such, includes very little actual style rules.
* There's plenty of examples in the included demo website that show
* how you can use the rendered class names to create your own
* beautiful experiences.
*

@@ -45,0 +83,0 @@ * This component is perfect for:

8

package.json
{
"name": "@lab49/react-order-book",
"version": "0.1.0",
"description": "Order book.",
"version": "0.1.1",
"description": "Render an order book for any asset class. Flexible and customizable.",
"author": "brianmcallister",
"license": "MIT",
"repository": "@lab49/react-order-book",
"bugs": {
"url": "https://github.com/lab49/react-order-book/issues"
},
"homepage": "https://github.com/lab49/react-order-book",
"keywords": [

@@ -9,0 +13,0 @@ "react",

# @lab49/react-order-book
> Sponsored by Lab49
<img src="https://www.lab49.com/wp-content/uploads/2020/06/logo.svg" />
[![codecov](https://codecov.io/gh/lab49/react-order-book/branch/master/graph/badge.svg)](https://codecov.io/gh/lab49/react-order-book) [![CircleCI](https://circleci.com/gh/lab49/react-order-book.svg?style=svg)](https://circleci.com/gh/lab49/react-order-book) [![npm version](https://img.shields.io/npm/v/@lab49/react-order-book?label=version&color=%2354C536&logo=npm)](https://www.npmjs.com/package/@lab49/react-order-book)
> Render and style an order book for any asset class. Flexible and customizable.
<h3>&nbsp;</h3>
<p align="center">
<img src="/.github/react-order-book.png" width="400">
<p align="center">Render an order book for any asset class. Flexible and customizable.</p>
</p>
<h3>&nbsp;</h3>
`react-order-book` is a simple, flexible order book rendering component. Pass in an order book as a prop, and cutomize the look and feel with plenty of configuration props, plus numerous styling hooks for visual customization.
`react-order-book` is a simple, flexible order book component. Pass in an order book as a prop, and cutomize the look and feel with plenty of configuration options, plus numerous styling hooks for visual customization.

@@ -88,3 +89,3 @@ `react-order-book` tries to be extremely unopinionated about styling, and as such, includes very little actual style rules. There's plenty of examples in the included demo website that show how you can use the rendered class names to create your own beautiful experiences.

```ts
```tsx
<OrderBook book={book} />

@@ -113,3 +114,3 @@

```ts
```tsx
import { OrderBook } from '@lab49/react-order-book';

@@ -123,29 +124,50 @@

```ts
export interface Props {
// For the internaly calculated colors, apply a background-color in the DOM.
interface Props {
/**
* For the internaly calculated colors, apply a background-color in the DOM.
*/
applyBackgroundColor?: boolean;
// Base color for the asks list.
// Default: [235, 64, 52]
/**
* Base color for the asks list.
*/
askColor?: RgbColor;
// Base color for the bids list.
// Default: [0, 216, 101]
/**
* Base color for the bids list.
*/
bidColor?: RgbColor;
// Order book object.
/**
* Order book object.
*/
book: OrderBook;
// Use a value of 1 for the opacity of each row's generated color.
/**
* Use a value of 1 for the opacity of each row's generated color.
*/
fullOpacity?: boolean;
// Color interpolator function.
/**
* Color interpolator function.
*/
interpolateColor?: Interpolator;
// Various layout options.
/**
* Various layout options.
*/
layout?: Layout;
// Limit the length of the rendered bids and asks.
/**
* Limit the length of the rendered bids and asks.
*/
listLength?: number;
// Show column headers.
/**
* Show column headers.
*/
showHeaders?: boolean;
// Show the spread.
/**
* Show the spread.
*/
showSpread?: boolean;
// Provide a custom spread value instead of letting OrderBook calculate it.
/**
* Provide a custom spread value instead of letting OrderBook calculate it.
*/
spread?: string;
// Prefix for the CSS class name in the DOM.
// Default: 'rob_OrderBook'
/**
* Prefix for the CSS class name in the DOM.
*/
stylePrefix?: string;

@@ -193,1 +215,7 @@ }

- [ ] Add formatters for price and size, allow custom formatting.
## Sponsored by Lab49
<a href="https://lab49.com">
<img src="https://www.lab49.com/wp-content/uploads/2020/06/logo.svg" />
</a>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc