Add wrapper component to data provider so that it can be styled
This commit is contained in:
parent
368e921efa
commit
2d62c6a413
|
@ -24,7 +24,10 @@ const addBuilderPreviewStyles = (node, styleString, componentId) => {
|
||||||
if (componentId === get(builderStore).selectedComponentId) {
|
if (componentId === get(builderStore).selectedComponentId) {
|
||||||
const style = window.getComputedStyle(node)
|
const style = window.getComputedStyle(node)
|
||||||
const property = style?.display === "table-row" ? "outline" : "border"
|
const property = style?.display === "table-row" ? "outline" : "border"
|
||||||
return styleString + `;${property}: 2px solid #4285f4 !important;`
|
return (
|
||||||
|
styleString +
|
||||||
|
`;${property}: 2px solid #4285f4 !important; border-radius: 4px !important;`
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
return styleString
|
return styleString
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,6 +103,8 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<div use:styleable={$component.styles}>
|
||||||
<Provider {actions} data={dataContext}>
|
<Provider {actions} data={dataContext}>
|
||||||
<slot />
|
<slot />
|
||||||
</Provider>
|
</Provider>
|
||||||
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue