@blockle/blocks-react-slot 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
# @blockle/blocks-slot
|
|
1
|
+
# @blockle/blocks-react-slot
|
|
2
2
|
|
|
3
3
|
A simple slot component for React.
|
|
4
4
|
|
|
5
|
+
> Note: The Slot component must be used as a direct child of the Template component.
|
|
6
|
+
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -11,9 +13,9 @@ npm install @blockle/blocks-slot
|
|
|
11
13
|
## Usage
|
|
12
14
|
|
|
13
15
|
```tsx
|
|
14
|
-
import { createSlottable
|
|
16
|
+
import { createSlottable } from '@blockle/blocks-slot';
|
|
15
17
|
|
|
16
|
-
const Template = createSlottable('button'); // Provide
|
|
18
|
+
const [Template, Slot] = createSlottable('button'); // Provide default html tag
|
|
17
19
|
|
|
18
20
|
export const Button = ({asChild}) => {
|
|
19
21
|
return (
|