1
0
Fork 0
mirror of synced 2024-10-03 02:27:06 +13:00

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 f94733db05
commit 19d71e318b

View file

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