# draft-js-plugin-editor-toolbar-picker

> Picker component for `draft-js-static-toolbar-plugin` and `draft-js-inline-toolbar-plugin`

Latest version **0.1.7** (published 2017-10-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install draft-js-plugin-editor-toolbar-picker
pnpm add draft-js-plugin-editor-toolbar-picker
yarn add draft-js-plugin-editor-toolbar-picker
bun add draft-js-plugin-editor-toolbar-picker
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.7 |
| Published | 2017-10-08 |
| First published | 2017-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Loy B. |
| Maintainers | lonord |
| Keywords | picker, draft, plugin |

## Links

- npm: https://www.npmjs.com/package/draft-js-plugin-editor-toolbar-picker
- Repository: https://github.com/lonord/draft-js-plugin-editor-toolbar-picker
- Homepage: https://github.com/lonord/draft-js-plugin-editor-toolbar-picker#readme
- Issues: https://github.com/lonord/draft-js-plugin-editor-toolbar-picker/issues
- npm.io page: https://npm.io/package/draft-js-plugin-editor-toolbar-picker

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^3.0.1
- [styled-components](https://npm.io/package/styled-components.md) ^2.1.2

## Recent versions

- 0.1.7 (latest) — 2017-10-08
- 0.1.6 — 2017-10-05
- 0.1.5 — 2017-09-24
- 0.1.4 — 2017-09-20
- 0.1.3 — 2017-09-20
- 0.1.2 — 2017-09-19
- 0.1.1 — 2017-09-19
- 0.1.0 — 2017-09-19

## README

# draft-js-plugin-editor-toolbar-picker
Picker component for `draft-js-static-toolbar-plugin` and `draft-js-inline-toolbar-plugin`

## Usage

Install via npm:

```bash
$ npm i draft-js-plugin-editor-toolbar-picker
```

And use in your project:

```js
import {
	BlockquoteButton,
	BoldButton,
	CodeBlockButton,
	CodeButton,
	HeadlineOneButton,
	HeadlineThreeButton,
	HeadlineTwoButton,
	ItalicButton,
	OrderedListButton,
	UnderlineButton,
	UnorderedListButton
} from 'draft-js-buttons'

import createPicker, { createTriggerButton } from 'draft-js-plugin-editor-toolbar-picker'
const Picker = createPicker({
	triggerItem: createTriggerButton({ child: 'H' }),
	items: [
		HeadlineOneButton,
		HeadlineTwoButton,
		HeadlineThreeButton
	]
	/* 
	other options:
	autoClose: boolean -> Auto close if click another location, default `true`
	closeButton: ReactNode -> Close button when `autoClose` is `false`
	*/
})

const toolbarPlugin = createToolbarPlugin({
	structure: [
		BoldButton,
		ItalicButton,
		UnderlineButton,
		CodeButton,
		Separator,
		Picker,   // Use `Picker` as an item button
		UnorderedListButton,
		OrderedListButton,
		BlockquoteButton,
		CodeBlockButton
	]
})
```

## License
MIT

---
_Source: https://npm.io/package/draft-js-plugin-editor-toolbar-picker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
