@quidgest/ui 0.0.9 → 0.1.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 CHANGED
@@ -17,23 +17,42 @@ pnpm add @quidgest/ui
17
17
 
18
18
  ## Usage
19
19
 
20
- Once installed, you can import and use components as follows:
20
+ Start by installing the framework. We recommend placing this logic in a dedicated file, such as `src/plugins/quidgest-ui.ts`.
21
21
 
22
- ```vue
22
+ ```ts
23
+ // src/plugins/quidgest-ui.ts
24
+
25
+ import { createFramework } from '@quidgest/ui'
26
+
27
+ const framework = createFramework()
28
+
29
+ export default framework
30
+ ```
31
+
32
+ Then, use the plugin in `main.ts`, as follows:
33
+
34
+ ```ts
35
+ // src/main.ts
36
+
37
+ import { createApp } from 'vue'
38
+ import App from './App.vue'
39
+
40
+ import framework from './plugins/quidgest-ui'
41
+
42
+ createApp(App).use(framework).mount('#app')
43
+ ```
44
+
45
+ Once installed, the components become globally available and can be used like so:
46
+
47
+ ```ts
23
48
  <template>
24
- <div>
25
- <q-button>Click me</q-button>
26
- </div>
49
+ <q-button @click="handleClick">Click me</q-button>
27
50
  </template>
28
51
 
29
- <script>
30
- import { QButton } from '@quidgest/ui'
31
-
32
- export default {
33
- components: {
34
- QButton
35
- }
36
- }
52
+ <script setup lang="ts">
53
+ function handleClick() {
54
+ console.log("Parallel lines have so much in common. It's a shame they'll never meet.")
55
+ }
37
56
  </script>
38
57
  ```
39
58
 
@@ -41,13 +60,7 @@ Once installed, you can import and use components as follows:
41
60
 
42
61
  The package utilizes Storybook for component development and organization. You can view the components locally in the Storybook documentation explorer.
43
62
 
44
- First, navigate to the package's directory:
45
-
46
- ```cli
47
- cd ui
48
- ```
49
-
50
- Next, run Storybook:
63
+ Execute the following command to run Storybook:
51
64
 
52
65
  ```cli
53
66
  npm run storybook