@socotra/ec-react-components 0.0.0-alpha.4 → 2.0.0
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 +50 -21
- package/dist/index.es.js +5108 -5002
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +32 -32
- package/dist/index.umd.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,30 +1,59 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @socotra/ec-react-components
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A React component library for generating forms and other components for EC.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This library is styled via [tailwindcss](https://tailwindcss.com/) and [shadcn/ui](https://ui.shadcn.com/).
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
7
|
+
- **Package name**: `@socotra/ec-react-components`
|
|
8
|
+
- **Repo Path**: `packages/components`
|
|
9
|
+
- **Install**:
|
|
10
|
+
```sh
|
|
11
|
+
npm i @socotra/ec-react-components
|
|
12
|
+
```
|
|
13
|
+
- **Usage**:
|
|
9
14
|
|
|
10
|
-
|
|
15
|
+
```js
|
|
16
|
+
// Import style.css anywhere in your application, preferably at the root
|
|
17
|
+
import '@socotra/ec-react-components/dist/style.css';
|
|
11
18
|
|
|
12
|
-
|
|
19
|
+
import { MyComponent } from '@socotra/ec-react-components';
|
|
20
|
+
```
|
|
13
21
|
|
|
14
|
-
|
|
22
|
+
### Customization
|
|
15
23
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
As this library is styled via shadcn components and tailwind, customization can be achieved by installing shadcn in your project. Follow the installation guide from [shadcn](https://ui.shadcn.com/docs/installation) and adjust your theme using the [theme creator](https://ui.shadcn.com/themes).
|
|
25
|
+
|
|
26
|
+
Once you install shadcn, or if you are using it already, **delete the style.css import** to avoid style collisions
|
|
27
|
+
|
|
28
|
+
### Running the Project
|
|
29
|
+
|
|
30
|
+
To build the package:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
pnpm run build
|
|
26
34
|
```
|
|
27
35
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
36
|
+
To run tests:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
pnpm run test
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
To run the linter:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
pnpm run lint
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
To run the sandbox
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
cd ../sandbox
|
|
52
|
+
pnpm run dev
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Installing directly for local development
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
pnpm i ../path/to/this/packages/components
|
|
59
|
+
```
|