@weni/unnnic-system 3.35.1 → 3.35.2
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 +24 -0
- package/dist/style.css +1 -1
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -20,6 +20,30 @@ Before install the lib, make sure you have installed the following tools on your
|
|
|
20
20
|
- [Node.js 20](https://nodejs.org/en)
|
|
21
21
|
- [NPM](https://www.npmjs.com/)
|
|
22
22
|
|
|
23
|
+
# Recommended usage (import on demand)
|
|
24
|
+
|
|
25
|
+
To avoid loading the entire design system when your module only uses a
|
|
26
|
+
few components, prefer named imports and local registration:
|
|
27
|
+
|
|
28
|
+
```vue
|
|
29
|
+
<script setup>
|
|
30
|
+
import { UnnnicButton, UnnnicInput } from '@weni/unnnic-system';
|
|
31
|
+
import '@weni/unnnic-system/dist/style.css';
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<UnnnicButton text="Save" />
|
|
36
|
+
<UnnnicInput v-model="value" />
|
|
37
|
+
</template>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
This ensures only the components referenced in your code end up in your
|
|
41
|
+
application's final bundle.
|
|
42
|
+
|
|
43
|
+
> Use `app.use(Unnnic, { ... })` only if your module actually uses most
|
|
44
|
+
> of the library — this mode registers **all** components globally,
|
|
45
|
+
> regardless of actual usage.
|
|
46
|
+
|
|
23
47
|
# Set up at projects with Vue 3
|
|
24
48
|
|
|
25
49
|
1. Install unnnic in your project
|