@emamid/svelte-data-table 0.0.16 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,5 +5,5 @@ export {};
|
|
|
5
5
|
* @property {string} [caption] - Text to be displayed inside the button.
|
|
6
6
|
* @property {ConstructorOfATypedSvelteComponent} [icon] - Icon to be displayed inside the button.
|
|
7
7
|
* @property {string} [iconClass] - CSS class of the icon to be displayed inside the button.
|
|
8
|
-
* @property {'left' | 'right'} [iconPosition] - Position of the icon, relative to the caption.
|
|
8
|
+
* @property {'left' | 'right'} [iconPosition] - Position of the icon, relative to the caption. Defaults to 'right'.
|
|
9
9
|
*/
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* @property {string} [caption] - Text to be displayed inside the button.
|
|
6
6
|
* @property {ConstructorOfATypedSvelteComponent} [icon] - Icon to be displayed inside the button.
|
|
7
7
|
* @property {string} [iconClass] - CSS class of the icon to be displayed inside the button.
|
|
8
|
-
* @property {'left' | 'right'} [iconPosition] - Position of the icon, relative to the caption.
|
|
8
|
+
* @property {'left' | 'right'} [iconPosition] - Position of the icon, relative to the caption. Defaults to 'right'.
|
|
9
9
|
*/
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import { Button } from "flowbite-svelte";
|
|
1
|
+
<script>import { Button } from "flowbite-svelte";
|
|
3
2
|
export let caption = "";
|
|
4
3
|
export let column;
|
|
5
4
|
export let item;
|
|
6
5
|
export let icon = null;
|
|
7
6
|
export let iconClass = "";
|
|
8
7
|
export let iconPosition = "right";
|
|
9
|
-
const dispatch = createEventDispatcher();
|
|
10
|
-
const buttonClicked = () => {
|
|
11
|
-
dispatch("click", {
|
|
12
|
-
column,
|
|
13
|
-
item
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
8
|
</script>
|
|
17
9
|
|
|
18
|
-
<Button
|
|
10
|
+
<Button>
|
|
19
11
|
{#if icon && iconPosition === 'left'}
|
|
20
12
|
<svelte:component this={icon} class={iconClass} />
|
|
21
13
|
{/if}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { ColumnConfig } from '../common.js';
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
5
|
-
[x: string]: any;
|
|
6
4
|
caption?: string | undefined;
|
|
7
5
|
column: ColumnConfig;
|
|
8
6
|
item: any;
|
|
@@ -11,8 +9,6 @@ declare const __propDef: {
|
|
|
11
9
|
iconPosition?: "left" | "right" | undefined;
|
|
12
10
|
};
|
|
13
11
|
events: {
|
|
14
|
-
click: CustomEvent<any>;
|
|
15
|
-
} & {
|
|
16
12
|
[evt: string]: CustomEvent<any>;
|
|
17
13
|
};
|
|
18
14
|
slots: {};
|