-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add EventHistoryViewTypeToggle and nest in Pagination when in table view
- Loading branch information
1 parent
6ffe354
commit 0695f03
Showing
4 changed files
with
109 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/lib/components/lines-and-dots/event-history-view-type-toggle.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<script lang="ts"> | ||
import ToggleButton from '$lib/holocene/toggle-button/toggle-button.svelte'; | ||
import ToggleButtons from '$lib/holocene/toggle-button/toggle-buttons.svelte'; | ||
import { translate } from '$lib/i18n/translate'; | ||
import { eventViewType } from '$lib/stores/event-view'; | ||
</script> | ||
|
||
<div class="flex flex-col items-center gap-2 md:flex-row md:gap-4"> | ||
<h2 class="text-2xl font-medium"> | ||
{translate('workflows.event-history')} | ||
</h2> | ||
<ToggleButtons> | ||
<ToggleButton | ||
active={$eventViewType === 'compact'} | ||
data-testid="compact" | ||
on:click={() => ($eventViewType = 'compact')} | ||
>{translate('workflows.compact')}</ToggleButton | ||
> | ||
<ToggleButton | ||
active={$eventViewType === 'timeline'} | ||
data-testid="timeline" | ||
on:click={() => ($eventViewType = 'timeline')} | ||
>{translate('common.timeline')}</ToggleButton | ||
> | ||
<ToggleButton | ||
active={$eventViewType === 'feed'} | ||
data-testid="feed" | ||
on:click={() => ($eventViewType = 'feed')} | ||
>{translate('workflows.full-history')}</ToggleButton | ||
> | ||
<ToggleButton | ||
active={$eventViewType === 'table'} | ||
data-testid="table" | ||
on:click={() => ($eventViewType = 'table')} | ||
>{translate('workflows.table')}</ToggleButton | ||
> | ||
</ToggleButtons> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters