@newlogic-digital/core 0.7.4 → 0.7.5
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/index.js +18 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -17,8 +17,25 @@ import {
|
|
17
17
|
|
18
18
|
const defineConfig = (config) => new Core().init(config);
|
19
19
|
|
20
|
+
const tailwindColors = (colors = []) => {
|
21
|
+
colors.forEach(name => {
|
22
|
+
colors[name] = ({opacityVariable, opacityValue}) => {
|
23
|
+
if (opacityValue !== undefined) {
|
24
|
+
return `rgba(var(--color-${name}), ${opacityValue})`
|
25
|
+
}
|
26
|
+
if (opacityVariable !== undefined) {
|
27
|
+
return `rgba(var(--color-${name}), var(${opacityVariable}, 1))`
|
28
|
+
}
|
29
|
+
return `rgb(var(--color-${name}))`
|
30
|
+
}
|
31
|
+
})
|
32
|
+
|
33
|
+
return colors
|
34
|
+
}
|
35
|
+
|
20
36
|
export {
|
21
37
|
defineConfig,
|
38
|
+
tailwindColors,
|
22
39
|
Core,
|
23
40
|
Utils,
|
24
41
|
Styles,
|
@@ -33,4 +50,4 @@ export {
|
|
33
50
|
Package,
|
34
51
|
Config,
|
35
52
|
root
|
36
|
-
}
|
53
|
+
}
|
package/package.json
CHANGED