@wra-gov/vue-components 0.19.3 → 0.19.4

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
@@ -47,8 +47,8 @@ Options API:
47
47
 
48
48
  export default {
49
49
  components: {
50
- WraButton,
51
- },
50
+ WraButton
51
+ }
52
52
  };
53
53
  </script>
54
54
  ```
@@ -77,6 +77,27 @@ export default defineNuxtPlugin((nuxtApp) => {
77
77
  });
78
78
  ```
79
79
 
80
+ ### Tailwind Usage
81
+
82
+ By default registering the component library imports the CSS variables.
83
+
84
+ However, to use the colours the component library provides in Tailwind helper
85
+ classes like this,
86
+
87
+ ```html
88
+ <div class="bg-wra-blue"></div>
89
+ ```
90
+
91
+ The component library's Tailwind stylesheet must be imported. The instructions
92
+ are created for Tailwind 4+. The CSS file must be the file imported by `index.html`
93
+
94
+ `tailwind.css` / `index.css`/ `style.css`
95
+
96
+ ```css
97
+ @import "tailwindcss";
98
+ @import "@wra-gov/vue-components/tailwind.css";
99
+ ```
100
+
80
101
  ## Documentation
81
102
 
82
103
  [Storybook documentation](https://welsh-revenue-authority.github.io/component-library)
@@ -0,0 +1,22 @@
1
+ @import "tailwindcss/theme.css" layer(theme);
2
+ @import "tailwindcss/utilities.css" layer(utilities);
3
+
4
+ @theme {
5
+ --color-wra-revenue: #2a225b;
6
+ --color-wra-black: #1f1f1f;
7
+ --color-wra-charcoal: #323232;
8
+ --color-wra-light-grey: #f1f1f1;
9
+ --color-wra-grey: #e5e5e5;
10
+ --color-wra-mid-grey: #b5b5b5;
11
+ --color-wra-dark-grey: #666666;
12
+ --color-wra-light-red: #ffe4e5;
13
+ --color-wra-red: #aa1111;
14
+ --color-wra-light-blue: #c2e0fc;
15
+ --color-wra-blue: #0360a6;
16
+ --color-wra-mid-blue: #3b7dc5;
17
+ --color-wra-dark-blue: #1f446d;
18
+ --color-wra-light-green: #cdf7d4;
19
+ --color-wra-green: #018a1e;
20
+ --color-wra-light-yellow: #fff5ce;
21
+ --color-wra-yellow: #ffd530;
22
+ }