This commit is contained in:
Martin McKeaveney 2020-02-18 19:24:18 +00:00
parent 8b64c64bab
commit e1eada45b8
4 changed files with 19 additions and 23 deletions

View File

@ -4,7 +4,7 @@
"main": "dist/index.js",
"module": "dist/index.js",
"scripts": {
"build": "rollup -c && rollup -c rollup.generatorsconfig.js",
"build": "rollup -c",
"prepublishOnly": "npm run build",
"testbuild": "rollup -w -c rollup.testconfig.js",
"dev": "run-p start:dev testbuild",

View File

@ -12,7 +12,8 @@
border-radius: 5px;
background: rgba(249, 249, 249, 1);
width: 1.8rem;
min-width: 1.8rem;
min-height: 1.8rem;
padding-bottom: 10px;
display: flex;

View File

@ -4,7 +4,7 @@
import { find, sortBy } from "lodash/fp"
import { ImageIcon, InputIcon, LayoutIcon } from "../common/Icons/"
import Select from "../common/Select.svelte"
import PlusButton from "../common/PlusButton.svelte"
import Button from "../common/PlusButton.svelte"
let componentLibraries = []
let current_view = "text"
@ -83,7 +83,8 @@
<ul class="preset-menu">
<span>{splitName(component.name).componentName} Presets</span>
{#each Object.keys(component.presets) as preset}
<li on:click|stopPropagation={() => onComponentChosen(component.name, preset)}>
<li
on:click|stopPropagation={() => onComponentChosen(component.name, preset)}>
{preset}
</li>
{/each}
@ -91,15 +92,16 @@
{/if}
</div>
{#if component.presets}
<PlusButton
<Button
on:click={() => {
selectedComponent = selectedComponent ? null : component.name;
}}
>
<span class="open-presets" class:open={selectedComponent === component.name}>
...
</span>
</PlusButton>
selectedComponent = selectedComponent ? null : component.name
}}>
<span
class="open-presets"
class:open={selectedComponent === component.name}>
...
</span>
</Button>
{/if}
</div>
{/each}
@ -209,4 +211,8 @@
color: var(--button-text);
background: var(--background-button) !important;
}
.open {
color: rgba(0, 85, 255, 1);
}
</style>

View File

@ -1,11 +0,0 @@
export const TEXTFIELD = {
STANDARD: {
variant: "standard"
},
FILLED: {
variant: "filled"
},
OUTLINED: {
variant: "outlined"
}
};