1
0
Fork 0
mirror of synced 2024-09-30 09:07:25 +13:00

Use discrete buttons with text for adding screens and components

This commit is contained in:
Andrew Kingston 2022-07-22 12:10:53 +01:00
parent e5da58e1fb
commit ef83fe50d8
2 changed files with 15 additions and 14 deletions

View file

@ -9,6 +9,7 @@
import { setContext } from "svelte"
import DNDPositionIndicator from "./DNDPositionIndicator.svelte"
import { DropPosition } from "./dndStore"
import { Button, Layout } from "@budibase/bbui"
let scrollRef
@ -61,13 +62,10 @@
})
</script>
<Panel
title="Components"
showAddButton
onClickAddButton={() => $goto("../new")}
showExpandIcon
borderRight
>
<Panel title="Components" showExpandIcon borderRight>
<div class="add-component">
<Button on:click={() => $goto("../new")} cta>Add component</Button>
</div>
<div class="nav-items-container" bind:this={scrollRef}>
<ul>
<li
@ -110,6 +108,13 @@
</Panel>
<style>
.add-component {
padding: var(--spacing-xl) var(--spacing-l);
padding-bottom: 0;
display: flex;
flex-direction: column;
align-items: stretch;
}
.nav-items-container {
padding: var(--spacing-xl) 0;
flex: 1 1 auto;

View file

@ -1,5 +1,5 @@
<script>
import { Search, Layout, Select, Body } from "@budibase/bbui"
import { Search, Layout, Select, Body, Button } from "@budibase/bbui"
import Panel from "components/design/Panel.svelte"
import { roles } from "stores/backend"
import { store, sortedScreens } from "builderStore"
@ -28,13 +28,9 @@
}
</script>
<Panel
title="Screens"
showAddButton
onClickAddButton={showNewScreenModal}
borderRight
>
<Panel title="Screens" borderRight>
<Layout paddingX="L" paddingY="XL" gap="S">
<Button on:click={showNewScreenModal} cta>Add screen</Button>
<Search
placeholder="Search"
value={searchString}