1
0
Fork 0
mirror of synced 2024-06-14 00:14:39 +12:00

Revert click context

This commit is contained in:
Andrew Kingston 2022-08-17 15:17:29 +01:00
parent a6108d1c8b
commit 6b8bf3f768
3 changed files with 1 additions and 15 deletions

View file

@ -4,7 +4,6 @@
const { styleable, builderStore } = getContext("sdk")
const component = getContext("component")
const containerClickableStore = getContext("containerClickable")
export let disabled = false
export let text = ""
@ -19,10 +18,6 @@
let node
containerClickableStore.subscribe(hasOnClick => {
disabled = hasOnClick
})
$: $component.editing && node?.focus()
$: componentText = getComponentText(text, $builderStore, $component)

View file

@ -1,13 +1,9 @@
<script>
import { getContext, setContext } from "svelte"
import { writable } from "svelte/store"
import { getContext } from "svelte"
const { styleable } = getContext("sdk")
const component = getContext("component")
const containerClickableStore = writable(false)
setContext("containerClickable", containerClickableStore)
export let direction
export let hAlign
export let vAlign
@ -28,7 +24,6 @@
sizeClass,
gapClass,
].join(" ")
$: containerClickableStore.set(!!onClick)
</script>
<div

View file

@ -333,10 +333,6 @@ const confirmTextMap = {
* A handler returning `false` is a flag to stop execution of handlers
*/
export const enrichButtonActions = (actions, context) => {
if (actions && actions.length === 0) {
return null
}
// Prevent button actions in the builder preview
if (!actions || get(builderStore).inBuilder) {
return () => {}