Add wrapper component to data provider so that it can be styled

This commit is contained in:
Andrew Kingston 2021-04-29 09:41:49 +01:00
parent 368e921efa
commit 2d62c6a413
2 changed files with 9 additions and 4 deletions

View File

@ -24,7 +24,10 @@ const addBuilderPreviewStyles = (node, styleString, componentId) => {
if (componentId === get(builderStore).selectedComponentId) {
const style = window.getComputedStyle(node)
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 {
return styleString
}

View File

@ -103,6 +103,8 @@
}
</script>
<Provider {actions} data={dataContext}>
<slot />
</Provider>
<div use:styleable={$component.styles}>
<Provider {actions} data={dataContext}>
<slot />
</Provider>
</div>