@bigbinary/neeto-site-blocks 0.4.5 → 0.4.6
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 +111 -5
- package/dist/index.cjs.js +2 -2
- package/dist/index.js +3 -3
- package/package.json +15 -5
- package/types.d.ts +27 -0
package/README.md
CHANGED
|
@@ -1,16 +1,124 @@
|
|
|
1
1
|
# @bigbinary/neeto-site-blocks
|
|
2
2
|
|
|
3
|
-
neetoSiteBlocks is the library that serves the building blocks for website in neeto-site. It is used in `neeto-site-web`
|
|
3
|
+
neetoSiteBlocks is the library that serves the building blocks for website in neeto-site. It is used in [`neeto-site-web`](https://github.com/bigbinary/neeto-site-web) and [`neeto-site-eui`](https://github.com/bigbinary/neeto-site-eui) to serve the blocks.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
```
|
|
7
|
+
```
|
|
8
8
|
yarn add @bigbinary/neeto-site-blocks
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
### Eg: FeatureSection
|
|
14
|
+
|
|
15
|
+
#### Props
|
|
16
|
+
1. **id**: To specify the id of the block.
|
|
17
|
+
2. **configuration**: Object containing the configuration for the block. It contains the following keys:
|
|
18
|
+
1. **design**: To specify the design of the block.
|
|
19
|
+
2. **properties**: To specify the properties of the block.
|
|
20
|
+
3. **className**: To specify the external classnames.
|
|
21
|
+
4. **baseUrl**: It is used within button and link component to specify the base url for navigation.
|
|
22
|
+
|
|
23
|
+
Here is an example of how to use the `FeatureSection` block.
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { FeatureSection } from "@bigbinary/neeto-site-blocks";
|
|
27
|
+
|
|
28
|
+
configurations: {
|
|
29
|
+
properties: {
|
|
30
|
+
content: {
|
|
31
|
+
title: "Title",
|
|
32
|
+
description: "Description",
|
|
33
|
+
position: "left",
|
|
34
|
+
},
|
|
35
|
+
buttons: [],
|
|
36
|
+
image: {
|
|
37
|
+
src:
|
|
38
|
+
"https://tailwindui.com/img/component-images/inbox-app-screenshot-2.jpg",
|
|
39
|
+
position: "right",
|
|
40
|
+
},
|
|
41
|
+
backgroundImage: {
|
|
42
|
+
src: "",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
design: {
|
|
46
|
+
body: {
|
|
47
|
+
backgroundColor: "#FFFFFF",
|
|
48
|
+
paddingVertical: 20,
|
|
49
|
+
borderTop: {
|
|
50
|
+
borderStyle: "none",
|
|
51
|
+
borderWidth: 0,
|
|
52
|
+
borderColor: "#FFFFFF",
|
|
53
|
+
},
|
|
54
|
+
borderBottom: {
|
|
55
|
+
borderStyle: "none",
|
|
56
|
+
borderWidth: 0,
|
|
57
|
+
borderColor: "#FFFFFF",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
title: {
|
|
61
|
+
fontSize: "3xl",
|
|
62
|
+
fontWeight: "extrabold",
|
|
63
|
+
color: "#2F3941",
|
|
64
|
+
marginTop: 0,
|
|
65
|
+
marginBottom: 5,
|
|
66
|
+
lineHeight: "none",
|
|
67
|
+
letterSpacing: "normal",
|
|
68
|
+
},
|
|
69
|
+
description: {
|
|
70
|
+
fontSize: "base",
|
|
71
|
+
fontWeight: "normal",
|
|
72
|
+
color: "#68737D",
|
|
73
|
+
marginTop: 0,
|
|
74
|
+
marginBottom: 8,
|
|
75
|
+
lineHeight: "normal",
|
|
76
|
+
letterSpacing: "normal",
|
|
77
|
+
},
|
|
78
|
+
buttons: {
|
|
79
|
+
fontSize: "sm",
|
|
80
|
+
fontWeight: "medium",
|
|
81
|
+
color: "#FFFFFF",
|
|
82
|
+
backgroundColor: "#4F46E5",
|
|
83
|
+
border: {
|
|
84
|
+
borderStyle: "none",
|
|
85
|
+
borderWidth: 0,
|
|
86
|
+
borderColor: "#4F46E5",
|
|
87
|
+
},
|
|
88
|
+
borderRadius: "sm",
|
|
89
|
+
paddingHorizontal: 4,
|
|
90
|
+
paddingVertical: 2,
|
|
91
|
+
letterSpacing: "normal",
|
|
92
|
+
},
|
|
93
|
+
image: {
|
|
94
|
+
width: "3/4",
|
|
95
|
+
borderRadius: "sm",
|
|
96
|
+
},
|
|
97
|
+
backgroundImage: {
|
|
98
|
+
backgroundSize: "cover",
|
|
99
|
+
backgroundPosition: "center",
|
|
100
|
+
backgroundRepeat: "no-repeat",
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
const FeatureSectionBlock = () => {
|
|
106
|
+
return (
|
|
107
|
+
<FeatureSection
|
|
108
|
+
id="feature-section"
|
|
109
|
+
configuration={configuration}
|
|
110
|
+
className="my-10"
|
|
111
|
+
baseUrl="/"
|
|
112
|
+
/>
|
|
113
|
+
);
|
|
114
|
+
};
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Development
|
|
118
|
+
|
|
119
|
+
Install all the dependencies by executing the following command
|
|
120
|
+
|
|
121
|
+
```bash
|
|
14
122
|
yarn install
|
|
15
123
|
yarn start
|
|
16
124
|
```
|
|
@@ -19,8 +127,6 @@ This will open up a playground for building the different blocks.
|
|
|
19
127
|
|
|
20
128
|
## Building
|
|
21
129
|
|
|
22
|
-
## Building
|
|
23
|
-
|
|
24
130
|
The `neeto-site-blocks` package gets auto-published to npm for every new merge to the
|
|
25
131
|
main branch. You can checkout the `publish` workflow in git actions to get a
|
|
26
132
|
live update.
|