Add ability to show component info above the settings panel and add info to side panels
This commit is contained in:
parent
bd954a0870
commit
bca9672926
|
@ -19,13 +19,19 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="property-group-container">
|
<div class="property-group-container">
|
||||||
<div class="property-group-name" on:click={onHeaderClick}>
|
{#if name}
|
||||||
<div class="name">{name}</div>
|
<div class="property-group-name" on:click={onHeaderClick}>
|
||||||
{#if collapsible}
|
<div class="name">{name}</div>
|
||||||
<Icon size="S" name={show ? "Remove" : "Add"} />
|
{#if collapsible}
|
||||||
{/if}
|
<Icon size="S" name={show ? "Remove" : "Add"} />
|
||||||
</div>
|
{/if}
|
||||||
<div class="property-panel" class:show={show || !collapsible}>
|
</div>
|
||||||
|
{/if}
|
||||||
|
<div
|
||||||
|
class="property-panel"
|
||||||
|
class:show={show || !collapsible}
|
||||||
|
class:no-title={!name}
|
||||||
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -72,6 +78,9 @@
|
||||||
padding: var(--spacing-s) var(--spacing-xl) var(--spacing-xl)
|
padding: var(--spacing-s) var(--spacing-xl) var(--spacing-xl)
|
||||||
var(--spacing-xl);
|
var(--spacing-xl);
|
||||||
}
|
}
|
||||||
|
.property-panel.no-title {
|
||||||
|
padding: var(--spacing-xl);
|
||||||
|
}
|
||||||
|
|
||||||
.show {
|
.show {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
<script>
|
||||||
|
import { DetailSummary, Icon } from "@budibase/bbui"
|
||||||
|
|
||||||
|
export let componentDefinition
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<DetailSummary collapsible={false}>
|
||||||
|
<div class="info">
|
||||||
|
<div class="title">
|
||||||
|
<Icon name="HelpOutline" />
|
||||||
|
{componentDefinition.name}
|
||||||
|
</div>
|
||||||
|
{componentDefinition.info}
|
||||||
|
</div>
|
||||||
|
</DetailSummary>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.title {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
text-transform: uppercase;
|
||||||
|
margin-bottom: var(--spacing-m);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
gap: var(--spacing-s);
|
||||||
|
color: var(--spectrum-global-color-gray-600);
|
||||||
|
}
|
||||||
|
.info {
|
||||||
|
padding: var(--spacing-m) var(--spacing-l) var(--spacing-l) var(--spacing-l);
|
||||||
|
background-color: rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: var(--border-radius-s);
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -5,6 +5,7 @@
|
||||||
import DesignSection from "./DesignSection.svelte"
|
import DesignSection from "./DesignSection.svelte"
|
||||||
import CustomStylesSection from "./CustomStylesSection.svelte"
|
import CustomStylesSection from "./CustomStylesSection.svelte"
|
||||||
import ConditionalUISection from "./ConditionalUISection.svelte"
|
import ConditionalUISection from "./ConditionalUISection.svelte"
|
||||||
|
import ComponentInfoSection from "./ComponentInfoSection.svelte"
|
||||||
import {
|
import {
|
||||||
getBindableProperties,
|
getBindableProperties,
|
||||||
getComponentBindableProperties,
|
getComponentBindableProperties,
|
||||||
|
@ -29,6 +30,9 @@
|
||||||
{#if $selectedComponent}
|
{#if $selectedComponent}
|
||||||
{#key $selectedComponent._id}
|
{#key $selectedComponent._id}
|
||||||
<Panel {title} icon={componentDefinition?.icon} borderLeft>
|
<Panel {title} icon={componentDefinition?.icon} borderLeft>
|
||||||
|
{#if componentDefinition.info}
|
||||||
|
<ComponentInfoSection {componentDefinition} />
|
||||||
|
{/if}
|
||||||
<ComponentSettingsSection
|
<ComponentSettingsSection
|
||||||
{componentInstance}
|
{componentInstance}
|
||||||
{componentDefinition}
|
{componentDefinition}
|
||||||
|
|
|
@ -5207,7 +5207,8 @@
|
||||||
"section"
|
"section"
|
||||||
],
|
],
|
||||||
"showEmptyState": false,
|
"showEmptyState": false,
|
||||||
"draggable": false
|
"draggable": false,
|
||||||
|
"info": "Side panels are hidden by default. They will only be revealed when triggered by the 'Open Side Panel' action."
|
||||||
},
|
},
|
||||||
"rowexplorer": {
|
"rowexplorer": {
|
||||||
"block": true,
|
"block": true,
|
||||||
|
|
Loading…
Reference in New Issue