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.
 
 
 
 
 
 

78 lines
1.4 KiB

<script>
import ComponentPanel from "./ComponentPanel.svelte"
import ComponentsList from "./ComponentsList.svelte"
let selected = "properties"
const isSelected = tab => selected === tab
const selectTab = tab => (selected = tab)
</script>
<div class="root">
<div class="switcher">
<button
class:selected={selected === 'properties'}
on:click={() => selectTab('properties')}>
Properties
</button>
<button
class:selected={selected === 'components'}
on:click={() => selectTab('components')}>
Components
</button>
</div>
<div class="panel">
{#if selected === 'properties'}
<ComponentPanel />
{/if}
{#if selected === 'components'}
<ComponentsList />
{/if}
</div>
</div>
<style>
.root {
height: 100%;
display: flex;
flex-direction: column;
padding: 2rem 1.5rem 2rem 1.5rem;
}
.switcher {
display: flex;
justify-content: space-between;
margin-bottom: 25px;
}
.switcher > button {
display: inline-block;
border: none;
margin: 0;
padding: 0;
cursor: pointer;
font-weight: 600;
font-size: 0.85rem;
text-transform: uppercase;
color: #999;
background-color: rgba(0, 0, 0, 0);
}
.switcher > .selected {
color: #333;
}
.panel {
flex: 1 1 auto;
height: 0px;
overflow-y: auto;
}
</style>