1
0
Fork 0
mirror of synced 2024-09-06 12:41:24 +12:00

refactor how modal is handled

This commit is contained in:
Peter Clement 2021-12-08 18:52:06 +00:00
parent 14213006e0
commit 43a69e22b9
3 changed files with 3 additions and 25 deletions

View file

@ -1,18 +1,9 @@
<script> <script>
import { import { ModalContent, Modal, Icon, ColorPicker, Label } from "@budibase/bbui"
Input,
ModalContent,
Body,
Modal,
Icon,
ColorPicker,
Label,
} from "@budibase/bbui"
import { apps } from "stores/portal" import { apps } from "stores/portal"
export let app export let app
let modal let modal
let dirty
let selectedIcon let selectedIcon
let selectedColor let selectedColor
@ -43,10 +34,6 @@
hide() hide()
} }
const onShow = () => {
dirty = false
}
const changeColor = val => { const changeColor = val => {
selectedColor = val selectedColor = val
} }
@ -59,7 +46,7 @@
} }
</script> </script>
<Modal bind:this={modal} on:hide={onCancel} on:show={onShow}> <Modal bind:this={modal} on:hide={onCancel}>
<ModalContent <ModalContent
title={"Edit Icon"} title={"Edit Icon"}
confirmText={"Save"} confirmText={"Save"}

View file

@ -3,7 +3,7 @@
import { notifications, Input, ModalContent, Dropzone } from "@budibase/bbui" import { notifications, Input, ModalContent, Dropzone } from "@budibase/bbui"
import { store, automationStore, hostingStore } from "builderStore" import { store, automationStore, hostingStore } from "builderStore"
import { admin, auth, users } from "stores/portal" import { admin, auth } from "stores/portal"
import { string, mixed, object } from "yup" import { string, mixed, object } from "yup"
import api, { get, post } from "builderStore/api" import api, { get, post } from "builderStore/api"
import analytics, { Events } from "analytics" import analytics, { Events } from "analytics"

View file

@ -31,15 +31,6 @@
</Layout> </Layout>
<style> <style>
.templates {
display: grid;
width: 100%;
grid-gap: var(--spacing-m);
grid-template-columns: 1fr;
justify-content: start;
margin-top: 15px;
}
.background-icon { .background-icon {
padding: 10px; padding: 10px;
border-radius: 4px; border-radius: 4px;