-
Notifications
You must be signed in to change notification settings - Fork 146
Expand file tree
/
Copy pathindex.svelte
More file actions
57 lines (50 loc) · 1.55 KB
/
index.svelte
File metadata and controls
57 lines (50 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<script lang="ts">
import type { Readable } from 'svelte/store';
import DrawerContent from '$lib/holocene/drawer-content.svelte';
import Drawer from '$lib/holocene/drawer.svelte';
import Icon from '$lib/holocene/icon/icon.svelte';
import { translate } from '$lib/i18n/translate';
import {
type ConfigurableTableHeader,
type ConfigurableTableType,
TABLE_TYPE,
} from '$lib/stores/configurable-table-columns';
import OrderableList from './orderable-list.svelte';
interface Props {
availableColumns: Readable<ConfigurableTableHeader[]>;
open: boolean;
table?: ConfigurableTableType;
type: string;
title: string;
}
let {
availableColumns,
open = $bindable(),
table = TABLE_TYPE.WORKFLOWS,
type,
title,
}: Props = $props();
const closeCustomizationDrawer = () => {
open = false;
};
</script>
<Drawer
{open}
onClick={closeCustomizationDrawer}
position="right"
id="{table}-table-configuration-drawer"
dark={false}
closeButtonLabel={translate('workflows.close-configure-headers', { title })}
class="w-[35vw] min-w-min max-w-fit"
>
<DrawerContent title={translate('workflows.configure-headers', { title })}>
<svelte:fragment slot="subtitle">
Add (<Icon class="inline" name="add" />), re-arrange (<Icon
class="inline"
name="chevron-selector-vertical"
/>), and remove (<Icon class="inline" name="hyphen" />), {type} to personalize
the {title}.
</svelte:fragment>
<OrderableList {availableColumns} {table} {type} />
</DrawerContent>
</Drawer>