merge conflicts from peter/tweaks

This commit is contained in:
Michael Shanks 2020-02-20 17:11:41 +00:00
parent f9f2abac33
commit f2e6ac0145
14 changed files with 369 additions and 151 deletions

View File

@ -55,7 +55,7 @@
flex: 0 0 auto; flex: 0 0 auto;
height: 48px; height: 48px;
background: white; background: white;
padding: 0px 15px; padding: 0px 15px 0 1.8rem;
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
@ -104,7 +104,7 @@
cursor: pointer; cursor: pointer;
outline: none; outline: none;
height: 40px; height: 40px;
padding: 8px 10px; padding: 8px 10px 8px 0;
} }
.home-logo:hover { .home-logo:hover {

View File

@ -721,9 +721,27 @@ const getContainerComponent = components =>
*/ */
const addChildComponent = store => (componentToAdd, presetName) => { const addChildComponent = store => (componentToAdd, presetName) => {
store.update(state => { store.update(state => {
function findSlot(component_array) {
for (let i = 0; i < component_array.length; i += 1) {
if (component_array[i]._component === "##builtin/screenslot")
return true
if (component_array[i]._children) findSlot(component_array[i])
}
return false
}
if (
componentToAdd.startsWith("##") &&
findSlot(state.pages[state.currentPageName].props._children)
) {
return state
}
const component = componentToAdd.startsWith("##") const component = componentToAdd.startsWith("##")
? getBuiltin(componentToAdd) ? getBuiltin(componentToAdd)
: state.components.find(({ name }) => name === componentToAdd) : state.components.find(({ name }) => name === componentToAdd)
const presetProps = presetName ? component.presets[presetName] : {} const presetProps = presetName ? component.presets[presetName] : {}
const newComponent = createProps(component, presetProps) const newComponent = createProps(component, presetProps)
@ -731,7 +749,9 @@ const addChildComponent = store => (componentToAdd, presetName) => {
newComponent.props newComponent.props
) )
_savePage(state) state.currentFrontEndType === "page"
? _savePage(state)
: _saveScreenApi(state.currentPreviewItem, state)
return state return state
}) })

View File

@ -0,0 +1,8 @@
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
width="100%"
height="100%">
<path fill="none" d="M0 0h24v24H0z" />
<path fill="currentColor" d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z" />
</svg>

After

Width:  |  Height:  |  Size: 213 B

View File

@ -1,10 +1,10 @@
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24" viewBox="0 0 24 24"
width="24" width="100%"
height="24"> height="100%">
<path fill="none" d="M0 0h24v24H0z" /> <path fill="none" d="M0 0h24v24H0z" />
<path <path
fill="currentColor" fill="currentColor"
d="M12 13.172l4.95-4.95 1.414 1.414L12 16 5.636 9.636 7.05 8.222z" /> d="M12 15l-4.243-4.243 1.415-1.414L12 12.172l2.828-2.829 1.415 1.414z" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 254 B

View File

@ -0,0 +1,10 @@
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
width="100%"
height="100%">
<path fill="none" d="M0 0h24v24H0z" />
<path
fill="currentColor"
d="M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z" />
</svg>

After

Width:  |  Height:  |  Size: 254 B

View File

@ -0,0 +1,12 @@
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
width="100%"
height="100%">
<path fill="none" d="M0 0h24v24H0z" />
<path
fill="currentColor"
d="M14 10v4h-4v-4h4zm2 0h5v4h-5v-4zm-2 11h-4v-5h4v5zm2 0v-5h5v4a1 1 0 0 1-1
1h-4zM14 3v5h-4V3h4zm2 0h4a1 1 0 0 1 1 1v4h-5V3zm-8 7v4H3v-4h5zm0 11H4a1 1 0
0 1-1-1v-4h5v5zM8 3v5H3V4a1 1 0 0 1 1-1h4z" />
</svg>

After

Width:  |  Height:  |  Size: 388 B

View File

@ -0,0 +1,12 @@
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
width="100%"
height="100%">
<path fill="none" d="M0 0h24v24H0z" />
<path
fill="currentColor"
d="M5 8a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm14 0a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0
14a3 3 0 1 1 0-6 3 3 0 0 1 0 6zM5 22a3 3 0 1 1 0-6 3 3 0 0 1 0 6zM9
4h6v2H9V4zm0 14h6v2H9v-2zM4 9h2v6H4V9zm14 0h2v6h-2V9z" />
</svg>

After

Width:  |  Height:  |  Size: 387 B

View File

@ -11,3 +11,7 @@ export { default as XCircleIcon } from "./XCircle.svelte"
export { default as ChevronUpIcon } from "./ChevronUp.svelte" export { default as ChevronUpIcon } from "./ChevronUp.svelte"
export { default as ChevronDownIcon } from "./ChevronDown.svelte" export { default as ChevronDownIcon } from "./ChevronDown.svelte"
export { default as CopyIcon } from "./Copy.svelte" export { default as CopyIcon } from "./Copy.svelte"
export { default as CheckIcon } from "./Check.svelte"
export { default as GridIcon } from "./Grid.svelte"
export { default as ShapeIcon } from "./Shape.svelte"
export { default as AddIcon } from "./Add.svelte"

View File

@ -60,6 +60,12 @@
store.addTemplatedComponent(instance.props) store.addTemplatedComponent(instance.props)
} }
function generate_components_list(components) {
return $store.currentFrontEndType === "page"
? $store.builtins.concat(components)
: components
}
$: { $: {
const newComponentLibraries = [] const newComponentLibraries = []
@ -111,6 +117,7 @@
{#if componentLibrary} {#if componentLibrary}
{#each $store.builtins.concat(componentLibrary.components) as component} {#each $store.builtins.concat(componentLibrary.components) as component}
{#each generate_components_list(componentLibrary.components) as component}
<div class="component-container"> <div class="component-container">
<div <div
class="component" class="component"
@ -159,7 +166,7 @@
</div> </div>
<ConfirmDialog <ConfirmDialog
bind:this={selectTemplateDialog} bind:this={selectTemplateDialog}
title="Choose Template" title="Choose Template"
onCancel={() => selectedComponent = null} onCancel={() => selectedComponent = null}

View File

@ -5,7 +5,7 @@
import ConfirmDialog from "../common/ConfirmDialog.svelte" import ConfirmDialog from "../common/ConfirmDialog.svelte"
import { pipe } from "../common/core" import { pipe } from "../common/core"
import { store } from "../builderStore" import { store } from "../builderStore"
import { ArrowDownIcon } from "../common/Icons/" import { ArrowDownIcon, ShapeIcon } from "../common/Icons/"
export let screens = [] export let screens = []
@ -26,8 +26,7 @@
) )
const lastPartOfName = c => const lastPartOfName = c =>
c && c && last(c.name ? c.name.split("/") : c._component.split("/"))
last(c.name ? c.name.split("/") : c._component.split("/"))
const isComponentSelected = (current, comp) => current === comp const isComponentSelected = (current, comp) => current === comp
@ -47,7 +46,6 @@
componentToDelete = component componentToDelete = component
confirmDeleteDialog.show() confirmDeleteDialog.show()
} }
</script> </script>
<div class="root"> <div class="root">
@ -55,17 +53,21 @@
{#each _screens as screen} {#each _screens as screen}
<div <div
class="hierarchy-item component" class="hierarchy-item component"
class:selected={$store.currentPreviewItem.name === screen.title} class:selected={$store.currentComponentInfo._id === screen.component.props._id}
on:click|stopPropagation={() => store.setCurrentScreen(screen.title)}> on:click|stopPropagation={() => store.setCurrentScreen(screen.title)}>
<span <span
class="icon" class="icon"
style="transform: rotate({$store.currentPreviewItem.name === screen.title ? 0 : -90}deg);"> class:rotate={$store.currentPreviewItem.name !== screen.title}>
{#if screen.component.props._children.length} {#if screen.component.props._children.length}
<ArrowDownIcon /> <ArrowDownIcon />
{/if} {/if}
</span> </span>
<span class="icon">
<ShapeIcon />
</span>
<span class="title">{screen.title}</span> <span class="title">{screen.title}</span>
</div> </div>
@ -73,41 +75,42 @@
<ComponentsHierarchyChildren <ComponentsHierarchyChildren
components={screen.component.props._children} components={screen.component.props._children}
currentComponent={$store.currentComponentInfo} currentComponent={$store.currentComponentInfo}
onSelect={store.selectComponent} onSelect={store.selectComponent}
onDeleteComponent={confirmDeleteComponent} onDeleteComponent={confirmDeleteComponent}
onMoveUpComponent={store.moveUpComponent} onMoveUpComponent={store.moveUpComponent}
onMoveDownComponent={store.moveDownComponent} onMoveDownComponent={store.moveDownComponent}
onCopyComponent={store.copyComponent}/> onCopyComponent={store.copyComponent} />
{/if} {/if}
{/each} {/each}
</div> </div>
<ConfirmDialog <ConfirmDialog
bind:this={confirmDeleteDialog} bind:this={confirmDeleteDialog}
title="Confirm Delete" title="Confirm Delete"
body={`Are you sure you wish to delete this '${lastPartOfName(componentToDelete._component)}' component`} body={`Are you sure you wish to delete this '${lastPartOfName(componentToDelete)}' component`}
okText="Delete Component" okText="Delete Component"
onOk={() => store.deleteComponent(componentToDelete)}/> onOk={() => store.deleteComponent(componentToDelete)} />
<style> <style>
.root { .root {
font-weight: 500; font-weight: 400;
font-size: 0.9rem; font-size: 0.8rem;
color: #828fa5; color: #333;
} }
.hierarchy-item { .hierarchy-item {
cursor: pointer; cursor: pointer;
padding: 11px 7px; padding: 0 7px 0 3px;
height: 35px;
margin: 5px 0; margin: 5px 0;
border-radius: 5px; border-radius: 0 5px 5px 0;
display: flex; display: flex;
align-items: center; align-items: center;
font-weight: 500;
} }
.hierarchy-item:hover { .hierarchy-item:hover {
/* color: var(--secondary); */
background: #fafafa; background: #fafafa;
} }
@ -118,12 +121,27 @@
.title { .title {
margin-left: 10px; margin-left: 10px;
margin-top: 2px;
} }
.icon { .icon {
display: inline-block; display: inline-block;
transition: 0.2s; transition: 0.2s;
width: 24px; width: 20px;
height: 24px; margin-top: 2px;
color: #333;
}
.icon:nth-of-type(2) {
width: 14px;
margin: 0 0 0 5px;
}
:global(svg) {
transition: 0.2s;
}
.rotate :global(svg) {
transform: rotate(-90deg);
} }
</style> </style>

View File

@ -1,7 +1,12 @@
<script> <script>
import { last } from "lodash/fp" import { last } from "lodash/fp"
import { pipe } from "../common/core" import { pipe } from "../common/core"
import { XCircleIcon, ChevronUpIcon, ChevronDownIcon, CopyIcon } from "../common/Icons" import {
XCircleIcon,
ChevronUpIcon,
ChevronDownIcon,
CopyIcon,
} from "../common/Icons"
export let components = [] export let components = []
export let currentComponent export let currentComponent
@ -12,9 +17,8 @@
export let onMoveDownComponent export let onMoveDownComponent
export let onCopyComponent export let onCopyComponent
const capitalise = s => s.substring(0, 1).toUpperCase() + s.substring(1) const capitalise = s => s.substring(0, 1).toUpperCase() + s.substring(1)
const get_name = s => !s ? "" : last(s.split("/")) const get_name = s => (!s ? "" : last(s.split("/")))
const get_capitalised_name = name => const get_capitalised_name = name =>
pipe( pipe(
@ -22,7 +26,7 @@
[get_name, capitalise] [get_name, capitalise]
) )
const moveDownComponent = component => { const moveDownComponent = component => {
const c = component const c = component
return () => { return () => {
return onMoveDownComponent(c) return onMoveDownComponent(c)
@ -40,21 +44,21 @@
<div>{get_capitalised_name(component._component)}</div> <div>{get_capitalised_name(component._component)}</div>
<div class="reorder-buttons"> <div class="reorder-buttons">
{#if index > 0} {#if index > 0}
<button on:click|stopPropagation={() => onMoveUpComponent(component)}> <button
<ChevronUpIcon /> on:click|stopPropagation={() => onMoveUpComponent(component)}>
</button> <ChevronUpIcon />
</button>
{/if} {/if}
{#if index < (components.length - 1)} {#if index < components.length - 1}
<button on:click|stopPropagation={moveDownComponent(component)}> <button on:click|stopPropagation={moveDownComponent(component)}>
<ChevronDownIcon /> <ChevronDownIcon />
</button> </button>
{/if} {/if}
</div> </div>
<button on:click|stopPropagation={() => onCopyComponent(component)}> <button on:click|stopPropagation={() => onCopyComponent(component)}>
<CopyIcon /> <CopyIcon />
</button> </button>
<button <button on:click|stopPropagation={() => onDeleteComponent(component)}>
on:click|stopPropagation={() => onDeleteComponent(component)}>
<XCircleIcon /> <XCircleIcon />
</button> </button>
</div> </div>
@ -81,18 +85,16 @@
margin: 0; margin: 0;
} }
li {
background: #fafafa;
}
.item { .item {
display: grid; display: grid;
grid-template-columns: 1fr auto auto auto; grid-template-columns: 1fr auto auto auto;
padding: 0px 5px 0px 15px; padding: 0px 5px 0px 15px;
margin: auto 0px; margin: auto 0px;
border-radius: 3px; border-radius: 3px;
height: 43px; height: 35px;
align-items: center; align-items: center;
font-size: 0.8rem;
font-weight: normal;
} }
.item button { .item button {
@ -109,7 +111,7 @@
} }
.item:hover button { .item:hover button {
border-style: none; border-style: none;
background: rgba(0,0,0,0); background: rgba(0, 0, 0, 0);
display: block; display: block;
cursor: pointer; cursor: pointer;
} }
@ -121,6 +123,7 @@
.selected { .selected {
color: var(--button-text); color: var(--button-text);
background: var(--background-button) !important; background: var(--background-button) !important;
font-weight: 500;
} }
.reorder-buttons { .reorder-buttons {
@ -134,5 +137,4 @@
height: 17px; height: 17px;
width: 30px; width: 30px;
} }
</style> </style>

View File

@ -0,0 +1,146 @@
<script>
// import { tick } from "svelte"
import ComponentsHierarchyChildren from "./ComponentsHierarchyChildren.svelte"
import { last, sortBy, map, trimCharsStart, trimChars, join } from "lodash/fp"
import ConfirmDialog from "../common/ConfirmDialog.svelte"
import { pipe } from "../common/core"
import { store } from "../builderStore"
import { ArrowDownIcon, GridIcon } from "../common/Icons/"
export let layout
let confirmDeleteDialog
let componentToDelete = ""
const joinPath = join("/")
const normalizedName = name =>
pipe(
name,
[
trimCharsStart("./"),
trimCharsStart("~/"),
trimCharsStart("../"),
trimChars(" "),
]
)
const lastPartOfName = c =>
c && last(c.name ? c.name.split("/") : c._component.split("/"))
const isComponentSelected = (current, comp) => current === comp
const isFolderSelected = (current, folder) => isInSubfolder(current, folder)
$: _layout = pipe(
layout,
[c => ({ component: c, title: lastPartOfName(c) })]
)
const isScreenSelected = component =>
component.component &&
$store.currentPreviewItem &&
component.component.name === $store.currentPreviewItem.name
const confirmDeleteComponent = async component => {
console.log(component)
componentToDelete = component
// await tick()
confirmDeleteDialog.show()
}
</script>
<div class="root">
<div
class="hierarchy-item component"
class:selected={$store.currentComponentInfo._id === _layout.component.props._id}
on:click|stopPropagation={() => store.setScreenType('page')}>
<span
class="icon"
class:rotate={$store.currentPreviewItem.name !== _layout.title}>
{#if _layout.component.props._children.length}
<ArrowDownIcon />
{/if}
</span>
<span class="icon">
<GridIcon />
</span>
<span class="title">Master Layout</span>
</div>
{#if $store.currentPreviewItem.name === _layout.title && _layout.component.props._children}
<ComponentsHierarchyChildren
components={_layout.component.props._children}
currentComponent={$store.currentComponentInfo}
onSelect={store.selectComponent}
onDeleteComponent={confirmDeleteComponent}
onMoveUpComponent={store.moveUpComponent}
onMoveDownComponent={store.moveDownComponent}
onCopyComponent={store.copyComponent} />
{/if}
</div>
<ConfirmDialog
bind:this={confirmDeleteDialog}
title="Confirm Delete"
body={`Are you sure you wish to delete this '${lastPartOfName(componentToDelete)}' component`}
okText="Delete Component"
onOk={() => store.deleteComponent(componentToDelete)} />
<style>
.root {
font-weight: 400;
font-size: 0.8rem;
color: #333;
}
.hierarchy-item {
cursor: pointer;
padding: 0 7px 0 3px;
height: 35px;
margin: 5px 0;
border-radius: 0 5px 5px 0;
display: flex;
align-items: center;
font-weight: 500;
}
.hierarchy-item:hover {
background: #fafafa;
}
.selected {
color: var(--button-text);
background: var(--background-button) !important;
}
.title {
margin-left: 10px;
margin-top: 2px;
}
.icon {
display: inline-block;
transition: 0.2s;
width: 20px;
margin-top: 2px;
color: #333;
}
.icon:nth-of-type(2) {
width: 14px;
margin: 0 0 0 5px;
}
:global(svg) {
transition: 0.2s;
}
.rotate :global(svg) {
transform: rotate(-90deg);
}
</style>

View File

@ -1,6 +1,7 @@
<script> <script>
import { store } from "../builderStore" import { store } from "../builderStore"
import getIcon from "../common/icon" import getIcon from "../common/icon"
import { CheckIcon } from "../common/Icons"
const getPage = (s, name) => { const getPage = (s, name) => {
const props = s.pages[name] const props = s.pages[name]
@ -22,19 +23,23 @@
</script> </script>
<div class="root"> <div class="root">
<select <ul>
id="page"
name="select"
on:change={({ target }) => store.setCurrentPage(target.value)}>
{#each pages as { title, id }} {#each pages as { title, id }}
<option value={id}>Page: {title}</option> <li>
{/each} <span class="icon">
{#if id === $store.currentPageName}
<CheckIcon />
{/if}
</span>
</select> <button
<span class="arrow"> class:active={id === $store.currentPageName}
{@html getIcon('chevron-down', '24')} on:click={() => store.setCurrentPage(id)}>
</span> {title}
</button>
</li>
{/each}
</ul>
</div> </div>
<style> <style>
@ -44,37 +49,36 @@
color: var(--secondary50); color: var(--secondary50);
font-weight: bold; font-weight: bold;
position: relative; position: relative;
padding-left: 1.8rem;
} }
select { ul {
display: block;
font-size: 16px;
font-family: sans-serif;
font-weight: 700;
color: #444;
line-height: 1.3;
padding: 1em 2.6em 0.9em 1.4em;
width: 100%;
max-width: 100%;
box-sizing: border-box;
margin: 0; margin: 0;
border: none; padding: 0;
border-radius: 0.5em; list-style: none;
-moz-appearance: none;
-webkit-appearance: none;
appearance: none;
background-color: #fafafa;
} }
.arrow { li {
position: absolute; margin: 0.5rem 0;
right: 10px; }
top: 0;
bottom: 0; button {
margin: auto; margin: 0 0 0 6px;
width: 30px; padding: 0;
height: 30px; border: none;
pointer-events: none; font-family: Roboto;
color: var(--primary100); font-size: 0.8rem;
outline: none;
cursor: pointer;
}
.active {
font-weight: 500;
}
.icon {
display: inline-block;
width: 14px;
color: #333;
} }
</style> </style>

View File

@ -1,6 +1,7 @@
<script> <script>
import ComponentsHierarchy from "./ComponentsHierarchy.svelte" import ComponentsHierarchy from "./ComponentsHierarchy.svelte"
import ComponentsHierarchyChildren from "./ComponentsHierarchyChildren.svelte" import ComponentsHierarchyChildren from "./ComponentsHierarchyChildren.svelte"
import MasterLayout from "./MasterLayout.svelte"
import PagesList from "./PagesList.svelte" import PagesList from "./PagesList.svelte"
import { store } from "../builderStore" import { store } from "../builderStore"
import IconButton from "../common/IconButton.svelte" import IconButton from "../common/IconButton.svelte"
@ -12,6 +13,7 @@
import ComponentsPaneSwitcher from "./ComponentsPaneSwitcher.svelte" import ComponentsPaneSwitcher from "./ComponentsPaneSwitcher.svelte"
import ConfirmDialog from "../common/ConfirmDialog.svelte" import ConfirmDialog from "../common/ConfirmDialog.svelte"
import { last } from "lodash/fp" import { last } from "lodash/fp"
import { AddIcon } from "../common/Icons"
let newComponentPicker let newComponentPicker
let confirmDeleteDialog let confirmDeleteDialog
@ -30,9 +32,8 @@
componentToDelete = component componentToDelete = component
confirmDeleteDialog.show() confirmDeleteDialog.show()
} }
const lastPartOfName = c => c ? last(c.split("/")) : "" const lastPartOfName = c => (c ? last(c.split("/")) : "")
</script> </script>
<div class="root"> <div class="root">
@ -40,63 +41,32 @@
<div class="ui-nav"> <div class="ui-nav">
<div class="pages-list-container"> <div class="pages-list-container">
<div class="nav-group-header"> <div class="nav-header">
<span class="navigator-title">Navigator</span> <span class="navigator-title">Navigator</span>
<span class="components-nav-header">Pages</span>
</div> </div>
<div class="nav-items-container"> <div class="nav-items-container">
<PagesList /> <PagesList />
</div> </div>
</div> </div>
<div class="components-list-container"> <div class="border-line" />
<div class="nav-group-header">
<span
on:click={() => store.setScreenType('page')}
class="components-nav-header"
class:active={$store.currentFrontEndType === 'page'}>
Page
</span>
</div>
<div class="nav-items-container">
{#if $store.currentFrontEndType === 'page'}
<ComponentsHierarchyChildren
components={$store.currentPreviewItem.props._children}
currentComponent={$store.currentComponentInfo}
onDeleteComponent={confirmDeleteComponent}
onSelect={store.selectComponent}
onMoveUpComponent={store.moveUpComponent}
onMoveDownComponent={store.moveDownComponent}
onCopyComponent={store.copyComponent}
level={-2} />
{/if}
</div>
</div>
<div class="components-list-container"> <div class="components-list-container">
<div class="nav-group-header"> <div class="nav-group-header">
<span class="components-nav-header" style="margin-top: 0;">
<span
on:click={() => store.setScreenType('screen')}
class="components-nav-header"
class:active={$store.currentFrontEndType === 'screen'}>
Screens Screens
</span> </span>
<div>
{#if $store.currentFrontEndType === 'screen'} <button on:click={newComponent}>
<div> <AddIcon />
<button on:click={newComponent}>+</button> </button>
</div> </div>
{/if}
</div> </div>
<div class="nav-items-container"> <div class="nav-items-container">
{#if $store.currentFrontEndType === 'screen'} <MasterLayout layout={$store.pages[$store.currentPageName]} />
<ComponentsHierarchy screens={$store.screens} /> <ComponentsHierarchy screens={$store.screens} />
{/if}
</div> </div>
</div> </div>
@ -117,12 +87,12 @@
<NewComponent bind:this={newComponentPicker} /> <NewComponent bind:this={newComponentPicker} />
<SettingsView bind:this={settingsView} /> <SettingsView bind:this={settingsView} />
<ConfirmDialog <ConfirmDialog
bind:this={confirmDeleteDialog} bind:this={confirmDeleteDialog}
title="Confirm Delete" title="Confirm Delete"
body={`Are you sure you wish to delete this '${lastPartOfName(componentToDelete._component)}' component`} body={`Are you sure you wish to delete this '${lastPartOfName(componentToDelete)}' component`}
okText="Delete Component" okText="Delete Component"
onOk={() => store.deleteComponent(componentToDelete)}/> onOk={() => store.deleteComponent(componentToDelete)} />
<style> <style>
button { button {
@ -130,19 +100,12 @@
outline: none; outline: none;
border: none; border: none;
border-radius: 5px; border-radius: 5px;
background: var(--background-button); width: 20px;
width: 1.8rem;
height: 1.8rem;
padding-bottom: 10px; padding-bottom: 10px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 0;
font-size: 1.2rem;
font-weight: 700;
color: var(--button-text);
} }
.root { .root {
@ -157,7 +120,7 @@
grid-column: 1; grid-column: 1;
background-color: var(--secondary5); background-color: var(--secondary5);
height: 100%; height: 100%;
padding: 0 1.5rem 0rem 1.5rem; padding: 0 1.5rem 0rem 0;
} }
.preview-pane { .preview-pane {
@ -179,6 +142,8 @@
font-size: 0.75rem; font-size: 0.75rem;
color: #999; color: #999;
text-transform: uppercase; text-transform: uppercase;
margin-top: 1rem;
font-weight: 500;
} }
.nav-group-header { .nav-group-header {
@ -186,13 +151,20 @@
padding-left: 1rem; padding-left: 1rem;
} }
.nav-header {
display: flex;
flex-direction: column;
margin-top: 1.5rem;
padding: 0 1.8rem;
}
.nav-items-container { .nav-items-container {
padding: 1rem 0rem 0rem 0rem; padding: 1rem 0rem 0rem 0rem;
} }
.nav-group-header { .nav-group-header {
display: flex; display: flex;
padding: 2rem 0 0 0; padding: 1.5rem 0 0 1.8rem;
font-size: 0.9rem; font-size: 0.9rem;
font-weight: bold; font-weight: bold;
justify-content: space-between; justify-content: space-between;
@ -228,9 +200,12 @@
text-transform: uppercase; text-transform: uppercase;
font-weight: 400; font-weight: 400;
color: #999; color: #999;
font-size: 0.9rem;
} }
.active { .border-line {
color: #333; border-bottom: 1px solid #ddd;
margin-top: 1.5rem;
width: calc(100% + 1.5rem);
} }
</style> </style>