1
0
Fork 0
mirror of synced 2024-09-18 10:20:11 +12:00
budibase/packages/builder/src/components/settings/SettingsModal.svelte

48 lines
975 B
Svelte
Raw Normal View History

2020-06-19 19:14:03 +12:00
<script>
import { General, DangerZone, APIKeys } from "./tabs"
2020-10-08 21:35:11 +13:00
import { Switcher, ModalContent } from "@budibase/bbui"
2020-06-19 19:14:03 +12:00
const tabs = [
{
title: "General",
key: "GENERAL",
component: General,
},
{
title: "API Keys",
key: "API_KEYS",
component: APIKeys,
},
2020-06-19 19:14:03 +12:00
{
title: "Danger Zone",
key: "DANGERZONE",
component: DangerZone,
},
]
2020-10-03 00:22:49 +13:00
2020-06-19 19:14:03 +12:00
let value = "GENERAL"
2020-10-03 00:22:49 +13:00
2020-06-19 19:14:03 +12:00
$: selectedTab = tabs.find(tab => tab.key === value).component
</script>
2020-10-08 21:35:11 +13:00
<ModalContent
title="Settings"
showConfirmButton={false}
showCancelButton={false}>
<div class="container">
<Switcher headings={tabs} bind:value>
<svelte:component this={selectedTab} />
</Switcher>
</div>
2020-10-08 21:35:11 +13:00
</ModalContent>
2020-06-19 19:14:03 +12:00
<style>
2020-09-30 22:24:16 +13:00
.container :global(section > header) {
/* Fix margin defined in BBUI as L rather than XL */
margin-bottom: var(--spacing-xl);
2020-06-19 19:14:03 +12:00
}
2020-10-03 00:22:49 +13:00
.container :global(textarea) {
min-height: 60px;
2020-06-19 19:14:03 +12:00
}
</style>