@brilo/base-blocks 0.1.18 → 0.1.20
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.
|
@@ -5,7 +5,7 @@ export function buildUspPreviewStyle(shared, resolveHex = (value) => value) {
|
|
|
5
5
|
return { rootClassName: '', iconClassName: '', cssVars: {} };
|
|
6
6
|
}
|
|
7
7
|
const icon = (_a = shared.icon) !== null && _a !== void 0 ? _a : {};
|
|
8
|
-
const rootClassName = clsx(shared.direction && `--direction-${shared.direction}`, shared.align && `--align-${shared.align}`, shared.textAlign && `--body-align-${shared.textAlign}`, shared.shadow && shared.shadow !== 'none' && `--shadow --shadow-${shared.shadow}`, icon.background && '--icon-background', icon.color && '--icon-color', icon.borderColor && '--icon-bordered', shared.backgroundColor && '--background-color', shared.borderColor && '--border', shared.textColor && '--text-color');
|
|
8
|
+
const rootClassName = clsx(shared.direction && `--direction-${shared.direction}`, shared.align && `--align-${shared.align}`, shared.textAlign && `--body-align-${shared.textAlign}`, shared.shadow && shared.shadow !== 'none' && `--shadow --shadow-${shared.shadow}`, icon.background && icon.background !== 'none' && '--icon-background', icon.color && icon.color !== 'none' && '--icon-color', icon.borderColor && '--icon-bordered', shared.backgroundColor && '--background-color', shared.borderColor && '--border', shared.textColor && '--text-color');
|
|
9
9
|
const iconClassName = clsx(icon.backgroundShape && icon.backgroundShape !== 'none' && `--background-shape --background-shape-${icon.backgroundShape}`);
|
|
10
10
|
const cssVars = {};
|
|
11
11
|
if (shared.borderColor)
|
|
@@ -14,9 +14,9 @@ export function buildUspPreviewStyle(shared, resolveHex = (value) => value) {
|
|
|
14
14
|
cssVars['--background-color'] = resolveHex(shared.backgroundColor);
|
|
15
15
|
if (shared.textColor)
|
|
16
16
|
cssVars['--text-color'] = resolveHex(shared.textColor);
|
|
17
|
-
if (icon.background)
|
|
17
|
+
if (icon.background && icon.background !== 'none')
|
|
18
18
|
cssVars['--icon-background-color'] = resolveHex(icon.background);
|
|
19
|
-
if (icon.color)
|
|
19
|
+
if (icon.color && icon.color !== 'none')
|
|
20
20
|
cssVars['--icon-color'] = resolveHex(icon.color);
|
|
21
21
|
if (icon.size)
|
|
22
22
|
cssVars['--icon-size'] = `${icon.size}px`;
|
package/package.json
CHANGED
|
@@ -37,8 +37,8 @@ export function buildUspPreviewStyle(shared?: UspSharedStyle, resolveHex: (value
|
|
|
37
37
|
shared.align && `--align-${shared.align}`,
|
|
38
38
|
shared.textAlign && `--body-align-${shared.textAlign}`,
|
|
39
39
|
shared.shadow && shared.shadow !== 'none' && `--shadow --shadow-${shared.shadow}`,
|
|
40
|
-
icon.background && '--icon-background',
|
|
41
|
-
icon.color && '--icon-color',
|
|
40
|
+
icon.background && icon.background !== 'none' && '--icon-background',
|
|
41
|
+
icon.color && icon.color !== 'none' && '--icon-color',
|
|
42
42
|
icon.borderColor && '--icon-bordered',
|
|
43
43
|
shared.backgroundColor && '--background-color',
|
|
44
44
|
shared.borderColor && '--border',
|
|
@@ -53,8 +53,8 @@ export function buildUspPreviewStyle(shared?: UspSharedStyle, resolveHex: (value
|
|
|
53
53
|
if (shared.borderColor) cssVars['--border-color'] = resolveHex(shared.borderColor)
|
|
54
54
|
if (shared.backgroundColor) cssVars['--background-color'] = resolveHex(shared.backgroundColor)
|
|
55
55
|
if (shared.textColor) cssVars['--text-color'] = resolveHex(shared.textColor)
|
|
56
|
-
if (icon.background) cssVars['--icon-background-color'] = resolveHex(icon.background)
|
|
57
|
-
if (icon.color) cssVars['--icon-color'] = resolveHex(icon.color)
|
|
56
|
+
if (icon.background && icon.background !== 'none') cssVars['--icon-background-color'] = resolveHex(icon.background)
|
|
57
|
+
if (icon.color && icon.color !== 'none') cssVars['--icon-color'] = resolveHex(icon.color)
|
|
58
58
|
if (icon.size) cssVars['--icon-size'] = `${icon.size}px`
|
|
59
59
|
if (icon.backgroundSize) cssVars['--icon-background-size'] = `${icon.backgroundSize}px`
|
|
60
60
|
if (icon.borderColor) {
|