l-min-components 1.8.466 → 1.8.467
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 +84 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,6 +70,90 @@ You can check your Node.js, npm, and Yarn version by running:
|
|
|
70
70
|
|
|
71
71
|
- If you encounter any issues during installation, ensure your Node.js, npm, and Yarn are updated to the latest versions and try re-running the installation commands.
|
|
72
72
|
|
|
73
|
+
## Consuming `l-min-components` in other applications
|
|
74
|
+
|
|
75
|
+
This repository is published as an npm package called `l-min-components`. Other Learngual frontends install it using npm *dist-tags* that map to each environment.
|
|
76
|
+
|
|
77
|
+
### Environment overview
|
|
78
|
+
|
|
79
|
+
- **Dev**
|
|
80
|
+
- Branch: `main`
|
|
81
|
+
- npm tag: `dev`
|
|
82
|
+
- Version pattern: `1.8.x`
|
|
83
|
+
- **Staging**
|
|
84
|
+
- Branch: `staging`
|
|
85
|
+
- npm tag: `staging`
|
|
86
|
+
- Version pattern: `1.8.x`
|
|
87
|
+
- **Production**
|
|
88
|
+
- Branch: `production`
|
|
89
|
+
- npm tag: `latest`
|
|
90
|
+
- Version pattern: `1.9.x`
|
|
91
|
+
|
|
92
|
+
### Installing in a downstream project
|
|
93
|
+
|
|
94
|
+
From your target application directory:
|
|
95
|
+
|
|
96
|
+
- **Dev environment**
|
|
97
|
+
- Using npm:
|
|
98
|
+
```bash
|
|
99
|
+
npm install l-min-components@dev --save
|
|
100
|
+
```
|
|
101
|
+
- Using Yarn:
|
|
102
|
+
```bash
|
|
103
|
+
yarn add l-min-components@dev
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
- **Staging environment**
|
|
107
|
+
- Using npm:
|
|
108
|
+
```bash
|
|
109
|
+
npm install l-min-components@staging --save
|
|
110
|
+
```
|
|
111
|
+
- Using Yarn:
|
|
112
|
+
```bash
|
|
113
|
+
yarn add l-min-components@staging
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
- **Production environment**
|
|
117
|
+
- Using npm:
|
|
118
|
+
```bash
|
|
119
|
+
npm install l-min-components --save
|
|
120
|
+
```
|
|
121
|
+
- Using Yarn:
|
|
122
|
+
```bash
|
|
123
|
+
yarn add l-min-components
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
To pin a specific release instead of a moving tag, install by explicit version, for example:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
npm install l-min-components@1.9.42 --save
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Using the components in your app
|
|
133
|
+
|
|
134
|
+
All components, hooks, and utilities are re-exported from a single entry point.
|
|
135
|
+
|
|
136
|
+
**Common imports**
|
|
137
|
+
|
|
138
|
+
```jsx
|
|
139
|
+
import {
|
|
140
|
+
ButtonComponent,
|
|
141
|
+
InputComponent,
|
|
142
|
+
Radio,
|
|
143
|
+
DropDownComponent,
|
|
144
|
+
ImageComponent,
|
|
145
|
+
} from "l-min-components/src/components";
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
You can then use them as regular React components:
|
|
149
|
+
|
|
150
|
+
```jsx
|
|
151
|
+
<ButtonComponent
|
|
152
|
+
text="Save"
|
|
153
|
+
onClick={handleSave}
|
|
154
|
+
/>
|
|
155
|
+
```
|
|
156
|
+
|
|
73
157
|
## Features
|
|
74
158
|
The Components repository includes a variety of reusable UI components, such as:
|
|
75
159
|
|