Only override color style on paragraphs if a color setting exists
This commit is contained in:
parent
26ed9da4de
commit
7e8bdae875
|
@ -19,12 +19,19 @@
|
||||||
|
|
||||||
// Add color styles to main styles object, otherwise the styleable helper
|
// Add color styles to main styles object, otherwise the styleable helper
|
||||||
// overrides the color when it's passed as inline style.
|
// overrides the color when it's passed as inline style.
|
||||||
$: styles = {
|
$: styles = enrichStyles($component.styles, color)
|
||||||
...$component.styles,
|
|
||||||
normal: {
|
const enrichStyles = (styles, color) => {
|
||||||
...$component.styles?.normal,
|
if (!color) {
|
||||||
color,
|
return styles
|
||||||
},
|
}
|
||||||
|
return {
|
||||||
|
...styles,
|
||||||
|
normal: {
|
||||||
|
...styles?.normal,
|
||||||
|
color,
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue