Slightly increase width of side panels and add expandable toggle for component tab
This commit is contained in:
parent
76feddfaff
commit
d96b9cfa97
|
@ -4,9 +4,11 @@
|
||||||
export let title
|
export let title
|
||||||
export let showAddButton = false
|
export let showAddButton = false
|
||||||
export let showBackButton = false
|
export let showBackButton = false
|
||||||
|
export let showExpandIcon = false
|
||||||
export let onClickAddButton
|
export let onClickAddButton
|
||||||
export let onClickBackButton
|
export let onClickBackButton
|
||||||
export let wide = false
|
|
||||||
|
let wide = false
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="navigation-panel" class:wide>
|
<div class="navigation-panel" class:wide>
|
||||||
|
@ -17,6 +19,13 @@
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<Heading size="XS">{title || ""}</Heading>
|
<Heading size="XS">{title || ""}</Heading>
|
||||||
</div>
|
</div>
|
||||||
|
{#if showExpandIcon}
|
||||||
|
<Icon
|
||||||
|
name={wide ? "Minimize" : "Maximize"}
|
||||||
|
hoverable
|
||||||
|
on:click={() => (wide = !wide)}
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
{#if showAddButton}
|
{#if showAddButton}
|
||||||
<div class="add-button" on:click={onClickAddButton}>
|
<div class="add-button" on:click={onClickAddButton}>
|
||||||
<Icon name="Add" />
|
<Icon name="Add" />
|
||||||
|
@ -30,16 +39,17 @@
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.navigation-panel {
|
.navigation-panel {
|
||||||
width: 260px;
|
width: 280px;
|
||||||
background: var(--background);
|
background: var(--background);
|
||||||
border-right: var(--border-light);
|
border-right: var(--border-light);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
|
transition: width 130ms ease-out;
|
||||||
}
|
}
|
||||||
.navigation-panel.wide {
|
.navigation-panel.wide {
|
||||||
width: 360px;
|
width: 420px;
|
||||||
}
|
}
|
||||||
.header {
|
.header {
|
||||||
flex: 0 0 48px;
|
flex: 0 0 48px;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.settings-panel {
|
.settings-panel {
|
||||||
width: 260px;
|
width: 280px;
|
||||||
background: var(--background);
|
background: var(--background);
|
||||||
border-left: var(--border-light);
|
border-left: var(--border-light);
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -64,6 +64,7 @@
|
||||||
title="Components"
|
title="Components"
|
||||||
showAddButton
|
showAddButton
|
||||||
onClickAddButton={() => $goto("../new")}
|
onClickAddButton={() => $goto("../new")}
|
||||||
|
showExpandIcon
|
||||||
>
|
>
|
||||||
<div class="nav-items-container" bind:this={scrollRef}>
|
<div class="nav-items-container" bind:this={scrollRef}>
|
||||||
<NavItem
|
<NavItem
|
||||||
|
|
|
@ -97,7 +97,6 @@
|
||||||
title="Add component"
|
title="Add component"
|
||||||
showBackButton
|
showBackButton
|
||||||
onClickBackButton={() => $goto("../slot")}
|
onClickBackButton={() => $goto("../slot")}
|
||||||
wide
|
|
||||||
>
|
>
|
||||||
<Layout paddingX="L" paddingY="XL" gap="S">
|
<Layout paddingX="L" paddingY="XL" gap="S">
|
||||||
<ActionGroup compact justified>
|
<ActionGroup compact justified>
|
||||||
|
@ -156,7 +155,7 @@
|
||||||
<style>
|
<style>
|
||||||
.component-grid {
|
.component-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
gap: var(--spacing-s);
|
gap: var(--spacing-s);
|
||||||
}
|
}
|
||||||
.component {
|
.component {
|
||||||
|
|
Loading…
Reference in New Issue