react-minimap-redux
Advanced tools
Comparing version 0.9.0 to 0.9.1
{ | ||
"name": "react-minimap-redux", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"description": "A minimap for React", | ||
@@ -5,0 +5,0 @@ "main": "dist/react-minimap.js", |
@@ -1,9 +0,9 @@ | ||
- Originally forked from [jeremy-carbonne/react-minimap](jeremy-carbonne/react-minimap) | ||
- Originally forked from | ||
[jeremy-carbonne/react-minimap](https://github.com/jeremy-carbonne/react-minimap) | ||
# react-minimap | ||
[![NPM](https://img.shields.io/npm/v/react-minimap.svg?style=flat-square)](https://www.npmjs.com/package/react-minimap) | ||
A minimap for React based on | ||
[jquery-minimap](https://github.com/john-bai/jquery-minimap) | ||
A minimap for React based on [jquery-minimap](https://github.com/john-bai/jquery-minimap) | ||
## Demo | ||
@@ -15,8 +15,9 @@ | ||
`npm i --save react-minimap` | ||
`yarn add react-minimap-redux` | ||
## Usage | ||
```js | ||
import Minimap from 'react-minimap'; | ||
import 'react-minimap/dist/react-minimap.css'; | ||
import Minimap from "react-minimap-redux"; | ||
import "react-minimap-redux/dist/react-minimap.css"; | ||
``` | ||
@@ -26,11 +27,11 @@ | ||
<Minimap selector=".card"> | ||
<div className="card"> | ||
<h1>Title</h1> | ||
</div> | ||
<div className="card"> | ||
<h1>Title 2</h1> | ||
<div className="card"> | ||
<h1>Titles are never rendered by the Minimap</h1> | ||
</div> | ||
</div> | ||
<div className="card"> | ||
<h1>Title</h1> | ||
</div> | ||
<div className="card"> | ||
<h1>Title 2</h1> | ||
<div className="card"> | ||
<h1>Titles are never rendered by the Minimap</h1> | ||
</div> | ||
</div> | ||
</Minimap> | ||
@@ -43,12 +44,11 @@ ``` | ||
| Prop name | Type | Default value | Description | | ||
|------------------|---------------------------------|----------------------------|------------------------------------------------------------------------------------------| | ||
| selector | string | is required | A css selector for specify what you want to render inside the minimap | | ||
| className | string | '' | A className for the minimap component | | ||
| width | number | `200` | | | ||
| height | number | `200` | | | ||
| keepAspectRatio | boolean | `false` | | | ||
| childComponent | any | Internal Component | Allows customizing how components matched by selector are rendered (optional) | | ||
| onMountCenterOnX | boolean | `false` | | | ||
| onMountCenterOnY | boolean | `false` | | | ||
| Prop name | Type | Default value | Description | | ||
| ---------------- | ------- | ------------------ | ----------------------------------------------------------------------------- | | ||
| selector | string | is required | A css selector for specify what you want to render inside the minimap | | ||
| className | string | '' | A className for the minimap component | | ||
| width | number | `200` | | | ||
| height | number | `200` | | | ||
| keepAspectRatio | boolean | `false` | | | ||
| childComponent | any | Internal Component | Allows customizing how components matched by selector are rendered (optional) | | ||
| onMountCenterOnX | boolean | `false` | | | ||
| onMountCenterOnY | boolean | `false` | | |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
105548