minor app improvements

This commit is contained in:
Ruben Fiszel
2023-03-20 08:35:44 +01:00
parent 211ad52edb
commit f26c7ff62b
3 changed files with 20 additions and 18 deletions

View File

@@ -50,7 +50,8 @@
css?.input?.class ?? ''
)}
style={css?.input?.style ?? ''}
on:focus={() => ($selectedComponent = id)}
on:focus|stopPropagation={() => ($selectedComponent = id)}
on:pointerdown|stopPropagation={() => ($selectedComponent = id)}
type="password"
bind:value
{placeholder}
@@ -63,6 +64,7 @@
)}
style={css?.input?.style ?? ''}
on:focus={() => ($selectedComponent = id)}
on:pointerdown|stopPropagation={() => ($selectedComponent = id)}
type="text"
bind:value
{placeholder}
@@ -75,6 +77,7 @@
)}
style={css?.input?.style ?? ''}
on:focus={() => ($selectedComponent = id)}
on:pointerdown|stopPropagation={() => ($selectedComponent = id)}
type="email"
bind:value
{placeholder}

View File

@@ -16,7 +16,7 @@
export let customCss: ComponentCustomCSS<'currencycomponent'> | undefined = undefined
export let render: boolean
const { app, worldStore } = getContext<AppViewerContext>('AppViewerContext')
const { app, worldStore, selectedComponent } = getContext<AppViewerContext>('AppViewerContext')
initOutput($worldStore, id, {
result: undefined
@@ -58,21 +58,20 @@
{#key isNegativeAllowed}
{#key locale}
{#key currency}
<CurrencyInput
inputClasses={{
formatted: twMerge('px-2 w-full py-1.5 windmillapp', css?.input?.class),
wrapper: 'w-full windmillapp',
formattedZero: twMerge('text-black windmillapp ', css?.input?.class)
}}
style={css?.input?.style}
bind:value
{currency}
{locale}
on:focus={(e) => {
e?.stopPropagation()
}}
{isNegativeAllowed}
/>
<div on:pointerdown|stopPropagation={() => ($selectedComponent = id)}>
<CurrencyInput
inputClasses={{
formatted: twMerge('px-2 w-full py-1.5 windmillapp', css?.input?.class),
wrapper: 'w-full windmillapp',
formattedZero: twMerge('text-black windmillapp ', css?.input?.class)
}}
style={css?.input?.style}
bind:value
{currency}
{locale}
{isNegativeAllowed}
/>
</div>
{/key}
{/key}
{/key}

View File

@@ -393,7 +393,7 @@ export const components = {
formbuttoncomponent: {
name: 'Modal Form',
icon: PlusSquare,
dims: '2:8-6:8' as AppComponentDimensions,
dims: '1:1-2:1' as AppComponentDimensions,
customCss: {
button: { class: '', style: '' },
popup: { class: '', style: '' }