Mark style categories as changed whenever any of their properties have changed

This commit is contained in:
Andrew Kingston 2021-01-05 11:47:56 +00:00
parent 82baab3d9d
commit 71a9e228d0
1 changed files with 7 additions and 1 deletions

View File

@ -11,9 +11,15 @@
export let open = false
$: style = componentInstance["_styles"][styleCategory] || {}
$: changed = properties.some(
prop =>
style[prop.key] != null &&
style[prop.key] !== "" &&
style[prop.key] !== prop.initialValue
)
</script>
<DetailSummary {name} on:open show={open} thin>
<DetailSummary name={`${name}${changed ? ' *' : ''}`} on:open show={open} thin>
<div>
{#each properties as props}
<PropertyControl