mirror of https://github.com/Budibase/budibase.git
committed by
GitHub
14 changed files with 228 additions and 8 deletions
@ -0,0 +1,36 @@ |
|||||
|
<script> |
||||
|
import { Label } from "@budibase/bbui" |
||||
|
import { getBindableProperties } from "builderStore/dataBinding" |
||||
|
import { currentAsset, store } from "builderStore" |
||||
|
import DrawerBindableInput from "components/common/DrawerBindableInput.svelte" |
||||
|
|
||||
|
export let parameters |
||||
|
|
||||
|
let bindingDrawer |
||||
|
$: bindings = getBindableProperties($currentAsset, $store.selectedComponentId) |
||||
|
</script> |
||||
|
|
||||
|
<div class="root"> |
||||
|
<Label small>Email</Label> |
||||
|
<DrawerBindableInput |
||||
|
title="Email" |
||||
|
value={parameters.email} |
||||
|
on:change={value => (parameters.email = value.detail)} |
||||
|
{bindings} /> |
||||
|
<Label small>Password</Label> |
||||
|
<DrawerBindableInput |
||||
|
title="Password" |
||||
|
value={parameters.password} |
||||
|
on:change={value => (parameters.password = value.detail)} |
||||
|
{bindings} /> |
||||
|
</div> |
||||
|
|
||||
|
<style> |
||||
|
.root { |
||||
|
display: grid; |
||||
|
column-gap: var(--spacing-l); |
||||
|
row-gap: var(--spacing-s); |
||||
|
grid-template-columns: auto 1fr auto 1fr; |
||||
|
align-items: baseline; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,7 @@ |
|||||
|
<div class="root">This action doesn't require any additional settings.</div> |
||||
|
|
||||
|
<style> |
||||
|
.root { |
||||
|
font-size: var(--font-size-s); |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,38 @@ |
|||||
|
<script> |
||||
|
import { getContext } from "svelte" |
||||
|
|
||||
|
const { styleable } = getContext("sdk") |
||||
|
const component = getContext("component") |
||||
|
|
||||
|
export let url |
||||
|
export let position |
||||
|
|
||||
|
let style = "" |
||||
|
$: { |
||||
|
if (url) { |
||||
|
style += `background-image: url("${url}");` |
||||
|
} |
||||
|
if (position) { |
||||
|
style += `background-position: ${position};` |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<div class="outer" use:styleable={$component.styles}> |
||||
|
<div class="inner" {style} /> |
||||
|
</div> |
||||
|
|
||||
|
<style> |
||||
|
.outer { |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
.inner { |
||||
|
position: absolute; |
||||
|
height: 100%; |
||||
|
width: 100%; |
||||
|
background-repeat: no-repeat; |
||||
|
background-size: cover; |
||||
|
background-position: center center; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,5 @@ |
|||||
|
<script> |
||||
|
import StringField from "./StringField.svelte" |
||||
|
</script> |
||||
|
|
||||
|
<StringField {...$$props} type="password" /> |
||||
Loading…
Reference in new issue