Remove some old stuff and update binding icon
This commit is contained in:
parent
06b438d585
commit
532b861bb0
|
@ -2,7 +2,6 @@
|
|||
import "@spectrum-css/popover/dist/index-vars.css"
|
||||
import Portal from "svelte-portal"
|
||||
import { createEventDispatcher } from "svelte"
|
||||
import buildStyle from "../utils/buildStyle"
|
||||
import positionDropdown from "../Actions/position_dropdown"
|
||||
import clickOutside from "../Actions/click_outside"
|
||||
|
||||
|
@ -10,7 +9,6 @@
|
|||
|
||||
export let anchor
|
||||
export let align = "right"
|
||||
export let borderColor = ""
|
||||
|
||||
export const show = () => {
|
||||
dispatch("open")
|
||||
|
@ -29,10 +27,6 @@
|
|||
hide()
|
||||
}
|
||||
}
|
||||
|
||||
$: menuStyle = buildStyle({
|
||||
borderColor,
|
||||
})
|
||||
</script>
|
||||
|
||||
{#if open}
|
||||
|
@ -41,7 +35,6 @@
|
|||
tabindex="0"
|
||||
use:positionDropdown={{ anchor, align }}
|
||||
use:clickOutside={hide}
|
||||
style={menuStyle}
|
||||
on:keydown={handleEscape}
|
||||
class="spectrum-Popover is-open"
|
||||
role="presentation">
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
<script>
|
||||
import Input from "../Form/Input.svelte"
|
||||
|
||||
export let categories = [
|
||||
{
|
||||
name: "Customers List - Data Row",
|
||||
items: [
|
||||
{ name: "Name", id: "chjaHICHc82h2" },
|
||||
{ name: "Created", id: "chjaHICgr56Hc82h2" },
|
||||
{ name: "Status", id: "chjaHICHc8646462h2" },
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Home Screen Components",
|
||||
items: [{ name: "Title", id: "chjaHICHc82h2" }],
|
||||
},
|
||||
]
|
||||
</script>
|
||||
|
||||
<div class="container">
|
||||
<Input thin placeholder="Search" />
|
||||
{#each categories as { name, items }}
|
||||
<div class="title">{name}</div>
|
||||
<ul>
|
||||
{#each items as { name, id }}
|
||||
<li>{name}</li>
|
||||
{/each}
|
||||
</ul>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -1,8 +0,0 @@
|
|||
<script>
|
||||
import Search from "./Search.svelte";
|
||||
import { View } from "svench";
|
||||
</script>
|
||||
|
||||
<View name="Name">
|
||||
<Search />
|
||||
</View>
|
|
@ -1,14 +0,0 @@
|
|||
export default function buildStyle(styles) {
|
||||
const convertCamel = str => {
|
||||
return str.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`)
|
||||
}
|
||||
|
||||
let str = ""
|
||||
for (let s in styles) {
|
||||
if (styles[s]) {
|
||||
let key = convertCamel(s)
|
||||
str += `${key}: ${styles[s]}; `
|
||||
}
|
||||
}
|
||||
return str
|
||||
}
|
|
@ -36,7 +36,7 @@
|
|||
on:change={event => onChange(event.detail)}
|
||||
{placeholder} />
|
||||
<div class="icon" on:click={bindingDrawer.show}>
|
||||
<Icon s name="Brackets" />
|
||||
<Icon s name="FlashOn" />
|
||||
</div>
|
||||
</div>
|
||||
<Drawer bind:this={bindingDrawer} {title}>
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
class="icon"
|
||||
data-cy={`${key}-binding-button`}
|
||||
on:click={bindingDrawer.show}>
|
||||
<Icon s name="Brackets" />
|
||||
<Icon s name="FlashOn" />
|
||||
</div>
|
||||
<Drawer bind:this={bindingDrawer} title={capitalise(key)}>
|
||||
<div slot="description">
|
||||
|
|
Loading…
Reference in New Issue