Budibase is an open-source low-code platform for creating internal apps in minutes. Supports PostgreSQL, MySQL, MSSQL, MongoDB, Rest API, Docker, K8s 🚀
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
547 B

import { writable } from "svelte/store"
const createBuilderStore = () => {
const initialState = {
inBuilder: false,
appId: null,
layout: null,
screen: null,
selectedComponentId: null,
previewId: null,
previewType: null,
}
const store = writable(initialState)
const actions = {
selectComponent: id => {
window.dispatchEvent(
new CustomEvent("bb-select-component", { detail: id })
)
},
}
return {
...store,
actions,
}
}
export const builderStore = createBuilderStore()