@wra-gov/vue-components 0.1.1 → 0.2.1

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 ADDED
@@ -0,0 +1,73 @@
1
+ # Welsh Revenue Authority Component Library
2
+
3
+ Vue component library created by Welsh Revenue Authority
4
+
5
+ [![NPM Version](https://img.shields.io/npm/v/%40wra-gov%2Fvue-components)](https://www.npmjs.com/package/@wra-gov/vue-components)
6
+
7
+ ## Installation
8
+
9
+ Dependencies:
10
+
11
+ - Vue 3
12
+ - maska
13
+
14
+ Install,
15
+
16
+ `npm install @wra/vue-components`
17
+
18
+ ## Usage
19
+
20
+ ### Default import
21
+
22
+ `main.js`,
23
+
24
+ ```js
25
+ import { createApp } from "vue";
26
+ import App from "./App.vue";
27
+ import Wra from "@wra-gov/vue-components";
28
+
29
+ const app = createApp(App);
30
+
31
+ // Global registration of all components
32
+ app.use(Wra);
33
+
34
+ app.mount("#app");
35
+ ```
36
+
37
+ ### Named imports
38
+
39
+ Composition API:
40
+
41
+ `*.vue`,
42
+
43
+ ```html
44
+ <script>
45
+ import WraButton from "@wra-gov/vue-components";
46
+
47
+ export default {
48
+ components: {
49
+ WraButton,
50
+ },
51
+ };
52
+ </script>
53
+ ```
54
+
55
+ Options API:
56
+
57
+ `*.vue`,
58
+
59
+ ```html
60
+ <script setup>
61
+ import { Button } from "@wra-gov/vue-components";
62
+ </script>
63
+
64
+ ...
65
+ ```
66
+
67
+ ## Documentation
68
+
69
+ [Storybook documentation](https://welsh-revenue-authority.github.io/component-library)
70
+
71
+ ## Licence and Copyright
72
+
73
+ WRA component library is available under [Open Government 3.0 licence](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/)