mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
feat: table cell button
This commit is contained in:
1 parent
a96a3af11f
commit
bc4f8ffb00
3 files changed
+30
-9
No files matched your search
@@ -0,0 +1,26 @@
|
||||
<script lang="ts">
|
||||
export let title = '';
|
||||
export let onlyDesktop = false;
|
||||
export let width: number = null;
|
||||
export let showOverflow = false;
|
||||
let className = '';
|
||||
export { className as class };
|
||||
export let style = '';
|
||||
export let right = false;
|
||||
</script>
|
||||
|
||||
<button
|
||||
{style}
|
||||
style:--p-col-width={width?.toString() ?? ''}
|
||||
class="table-col {className}"
|
||||
class:u-overflow-visible={showOverflow}
|
||||
class:is-only-desktop={onlyDesktop}
|
||||
class:u-flex={right}
|
||||
class:u-main-end={right}
|
||||
data-title={title}
|
||||
role="cell"
|
||||
on:click
|
||||
on:keypress
|
||||
data-private>
|
||||
<slot />
|
||||
</button>
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { toggle } from '$lib/helpers/array';
|
||||
import { isHTMLInputElement } from '$lib/helpers/types';
|
||||
import { TableCell } from '.';
|
||||
import { TableCellButton } from '.';
|
||||
import { InputCheckbox } from '../forms';
|
||||
|
||||
export let id: string;
|
||||
@@ -24,13 +24,7 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<TableCell>
|
||||
<div
|
||||
class="touch-area"
|
||||
role="button"
|
||||
tabindex="-1"
|
||||
on:click={handleClick}
|
||||
on:keypress={handleClick} />
|
||||
<TableCellButton on:click={handleClick} on:keypress={handleClick}>
|
||||
<InputCheckbox
|
||||
bind:element={el}
|
||||
id="select-{id}"
|
||||
@@ -38,4 +32,4 @@
|
||||
checked={selectedIds.includes(id)}
|
||||
{disabled}
|
||||
on:click={handleClick} />
|
||||
</TableCell>
|
||||
</TableCellButton>
|
||||
@@ -8,6 +8,7 @@ export { default as TableRow } from './row.svelte';
|
||||
export { default as TableRowLink } from './rowLink.svelte';
|
||||
export { default as TableRowButton } from './rowButton.svelte';
|
||||
export { default as TableCell } from './cell.svelte';
|
||||
export { default as TableCellButton } from './cellButton.svelte';
|
||||
export { default as TableCellHead } from './cellHead.svelte';
|
||||
export { default as TableCellHeadCheck } from './cellHeadCheck.svelte';
|
||||
export { default as TableCellLink } from './cellLink.svelte';
|
||||
|
||||
Reference in new issue
Block a user