@wixc3/board-plugins
TypeScript icon, indicating that this package has built-in type declarations

4.6.2 • Public • Published

@wixc3/board-plugins

npm version

Plugins can add more meta data, modify the rendering environment, wrap the render result and much more. Plugins are specific to a sub-type of IGeneralMetadata and can use the hooks supplied by the meta data type.

For instance, cssVarsPlugin is only applicable to IRenderable and uses the beforeRender hook.

Usage

import { createBoard } from '@wixc3/react-board';
import { tagsPlugin, cssVarsPlugin } from '@wixc3/board-plugins';
import { AutoComplete } from './auto-complete';

createBoard({
  name: 'some board',
  Board: () => <AutoComplete />,
  plugins: [
    tagsPlugin.use({
      tags: ['react', 'forms', 'completions'],
    }),
    cssVarsPlugin.use({
      '--label-color': 'red',
    }),
  ],
});

tagsPlugin

Adds relevant tags to the board. Useful for indexing the boards.

cssVarsPlugin

Accepts a record containing css var names and values to give them during rendering. Adds those css variables to the canvas style.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @wixc3/board-plugins

Weekly Downloads

6

Version

4.6.2

License

MIT

Unpacked Size

9.08 kB

Total Files

18

Last publish

Collaborators

  • tomrav
  • avi.vahl
  • alexswix
  • devex-infra
  • iuriikowix
  • pijusn
  • omerk
  • talga
  • cijoe
  • wix-ci
  • wixnpm
  • baraki
  • interal
  • alisey
  • danieleww
  • idoros
  • nadavwix
  • rashellek
  • wtfil
  • denysdovhan
  • vkobeliatskyi
  • pistolpete_
  • nettaru
  • igalh
  • netanelgilad
  • anatfenn
  • erezshasha
  • zemlanin
  • arnonkehat
  • ariki
  • itpurchases
  • danalevy
  • serhiiz
  • oleksandraab
  • idango10
  • mikanadel
  • tetiana0611
  • vladkar
  • yurii-v
  • elig-wix
  • nadav.a
  • vladyslavgoloshchapov
  • shireewill
  • thealmightycrumb
  • itaywix
  • olehr
  • haryelp
  • ekaterinaza
  • matang
  • ilyakwix
  • noammu
  • plisovyi
  • alissawix
  • daomry
  • dlvhdr
  • shakederin
  • noama
  • gregdamsky
  • dorza
  • 0xrezaa
  • yuriin
  • ranberko91
  • vladyslav-baliuk
  • yurimorkovnik
  • vladba-wix
  • danielgovrin
  • buchenpilar
  • oleksiiletushev
  • alisalachman