2019-08-16 16:48:45 +02:00
|
|
|
<script>
|
2020-02-03 10:50:30 +01:00
|
|
|
import Checkbox from "../common/Checkbox.svelte"
|
|
|
|
import Textbox from "../common/Textbox.svelte"
|
|
|
|
import Dropdown from "../common/Dropdown.svelte"
|
|
|
|
import StateBindingControl from "./StateBindingControl.svelte"
|
|
|
|
|
|
|
|
export let setProp = () => {}
|
|
|
|
export let index
|
|
|
|
export let prop_name
|
|
|
|
export let prop_value
|
2020-02-14 12:51:45 +01:00
|
|
|
export let prop_definition = {}
|
2020-02-03 10:50:30 +01:00
|
|
|
|
|
|
|
const setComponentProp = props => {
|
|
|
|
setProp(propDef.____name, props)
|
|
|
|
}
|
2019-08-16 16:48:45 +02:00
|
|
|
</script>
|
|
|
|
|
2020-02-03 10:50:30 +01:00
|
|
|
<div class="root">
|
2020-02-14 12:51:45 +01:00
|
|
|
{#if prop_definition.type !== 'event'}
|
2020-01-24 15:30:17 +01:00
|
|
|
<h5>{prop_name}</h5>
|
2020-02-03 10:50:30 +01:00
|
|
|
<StateBindingControl
|
|
|
|
value={prop_value}
|
2020-02-14 12:51:45 +01:00
|
|
|
type={prop_definition.type}
|
|
|
|
options={prop_definition.options}
|
2020-04-27 12:26:34 +02:00
|
|
|
styleBindingProperty={prop_definition.styleBindingProperty}
|
2020-02-03 10:50:30 +01:00
|
|
|
onChanged={v => setProp(prop_name, v)} />
|
|
|
|
{/if}
|
2019-08-16 16:48:45 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<style>
|
2020-02-03 10:50:30 +01:00
|
|
|
.root {
|
|
|
|
height: 40px;
|
|
|
|
margin-bottom: 15px;
|
|
|
|
display: grid;
|
|
|
|
grid-template-rows: 1fr;
|
|
|
|
grid-template-columns: 70px 1fr;
|
|
|
|
grid-gap: 10px;
|
2020-03-19 10:34:23 +01:00
|
|
|
align-items: baseline;
|
2020-02-03 10:50:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
h5 {
|
|
|
|
word-wrap: break-word;
|
2020-04-02 18:11:38 +02:00
|
|
|
font-size: 13px;
|
2020-03-16 19:18:42 +01:00
|
|
|
font-weight: 400;
|
|
|
|
color: #000333;
|
|
|
|
opacity: 0.8;
|
2020-04-02 18:11:38 +02:00
|
|
|
padding-top: 13px;
|
2020-02-03 10:50:30 +01:00
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
2020-01-21 15:50:35 +01:00
|
|
|
</style>
|