Skip to content

Commit

Permalink
demo(svelte): updated demo
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Jul 15, 2022
1 parent 0119934 commit 45efebf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions demo-snippets/svelte/Basic.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<script lang="typescript">
import { showPopover } from '@nativescript-community/ui-popover/svelte';
import { Color } from '@nativescript/core';
import PopoverComponent from './PopoverComponent.svelte';
function openPopover(event) {
showPopover({
anchor: event.object,
view: PopoverComponent,
hideArrow:false,
props:{
title:'my popover'
}
Expand Down
6 changes: 3 additions & 3 deletions demo-snippets/svelte/PopoverComponent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export let min = 0;
export let max = 1;
export let value = 0;
export let backgroundColor = 'yellow';
export let backgroundColor = 'white';
export let onChange = null;
export let formatter = (value) => value + '';
Expand All @@ -14,8 +14,8 @@
}
</script>

<gridLayout>
<gridLayout rows="auto,auto" columns="auto,*,auto" padding="0 10 0 10" borderRadius={4} {backgroundColor} margin="2">
<gridLayout width="80%" rows="auto" {backgroundColor}>
<gridLayout rows="auto,auto" columns="auto,*,auto" padding="0 10 0 10" borderRadius={4} margin="2">
{#if title}
<label text={title} col={1} marginTop="0" />
{/if}
Expand Down

0 comments on commit 45efebf

Please sign in to comment.