@wixc3/react-board
Advanced tools
Comparing version
export * from './create-board'; | ||
export * from './types'; | ||
export * from './content-slot'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -19,2 +19,3 @@ "use strict"; | ||
__exportStar(require("./types"), exports); | ||
__exportStar(require("./content-slot"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@wixc3/react-board", | ||
"description": "Library for creation of React component boards", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"main": "dist/index.js", | ||
@@ -11,3 +11,3 @@ "peerDependencies": { | ||
"dependencies": { | ||
"@wixc3/board-core": "^2.3.0" | ||
"@wixc3/board-core": "^2.4.0" | ||
}, | ||
@@ -14,0 +14,0 @@ "files": [ |
@@ -36,4 +36,28 @@ # @wixc3/react-board | ||
You can also create boards with separation between the actual content and the board environment (context providers, board styling). | ||
This will be helpful in board templates, to indicate to Codux where to put the component in the generated board. | ||
Or in boards, so that when the board is converted to a code snippet, only the children of the `<ContentSlot>` will be included in the snippet. | ||
This is useful when the board is wrapped in a router or a context provider that shouldn't be included in the snippet. | ||
```tsx | ||
// hello.board.tsx | ||
import { createBoard, ContentSlot } from '@wixc3/react-board'; | ||
import { Hello } from './hello'; | ||
createBoard({ | ||
name: 'hello board', | ||
board: () => ( | ||
<SomeWrappingComponent> | ||
<p>description</p> | ||
<ContentSlot> | ||
<Hello name="World" />, | ||
</ContentSlot> | ||
<SomeWrappingComponent> | ||
) | ||
}); | ||
``` | ||
## License | ||
MIT |
export * from './create-board'; | ||
export * from './types'; | ||
export * from './content-slot'; |
@@ -20,3 +20,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
renderableElement: JSX.Element, | ||
canvas: HTMLElement | ||
canvas: HTMLElement, | ||
) => null | JSX.Element; | ||
@@ -23,0 +23,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
21616
10.57%28
21.74%306
5.88%63
61.54%Updated