-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d600e6e
commit aa4fdac
Showing
8 changed files
with
113 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,6 @@ | |
svg { | ||
display: block; | ||
transform: rotate(-45deg); | ||
fill: var(--fill, var(--black, #0c1e27)); | ||
} | ||
</style> |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<script lang="ts"> | ||
import { Hash16, Infinity16, StarFill16, Tag16 } from "svelte-octicons"; | ||
import Pin from "@/common/icons/Pin.svelte"; | ||
import SidebarItem from "@/lib/components/sidebar/SidebarItem.svelte"; | ||
import Premium from "@/common/icons/Premium.svelte"; | ||
import { _ } from "svelte-i18n"; | ||
import Flex from "../common/Flex.svelte"; | ||
import { CATEGORIES } from "$lib/api/addons"; | ||
export let active: string = "all"; | ||
</script> | ||
|
||
<Flex direction="column" gap={1}> | ||
<header class="header"> | ||
<h2>{$_("addonBrowserDialog.title")}</h2> | ||
<p>{$_("addonBrowserDialog.subtitle")}</p> | ||
</header> | ||
<Flex direction="column"> | ||
<SidebarItem | ||
active={active === "all"} | ||
href="/app/add-ons" | ||
--hover="var(--blue-2)" | ||
> | ||
<Infinity16 fill="var(--blue-3)" /> | ||
All | ||
</SidebarItem> | ||
<SidebarItem | ||
active={active === "pinned"} | ||
href="/app/add-ons?active=true" | ||
--hover="var(--orange-light)" | ||
> | ||
<Pin --fill="var(--orange)" /> | ||
Pinned | ||
</SidebarItem> | ||
<SidebarItem | ||
active={active === "featured"} | ||
href="/app/add-ons?featured=true" | ||
--hover="var(--yellow-light)" | ||
> | ||
<StarFill16 fill="var(--yellow)" /> | ||
Featured | ||
</SidebarItem> | ||
<SidebarItem | ||
active={active === "premium"} | ||
href="/app/add-ons?premium=true" | ||
--hover="var(--green-light)" | ||
> | ||
<Premium --fill="var(--green)" /> | ||
Premium | ||
</SidebarItem> | ||
</Flex> | ||
<Flex direction="column"> | ||
<SidebarItem small --color="var(--gray-4)">Collections</SidebarItem> | ||
{#each CATEGORIES as [key, label]} | ||
<SidebarItem href={`/app/add-ons?category=${key}`}> | ||
<!-- <Hash16 fill="var(--gray-4)" /> --> | ||
{label} | ||
</SidebarItem> | ||
{/each} | ||
</Flex> | ||
</Flex> |
21 changes: 21 additions & 0 deletions
21
src/lib/components/addons/stories/AddOnsNavigation.stories.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,21 @@ | ||
<script context="module" lang="ts"> | ||
import { Story, Template } from "@storybook/addon-svelte-csf"; | ||
import AddOnNavigation from "../AddOnsNavigation.svelte"; | ||
export const meta = { | ||
title: "Components / Add-Ons / Navigation", | ||
component: AddOnNavigation, | ||
tags: ["autodocs"], | ||
parameters: { layout: "centered" }, | ||
}; | ||
let args = { | ||
active: "all", | ||
}; | ||
</script> | ||
|
||
<Template let:args> | ||
<AddOnNavigation {...args} /> | ||
</Template> | ||
|
||
<Story name="Navigation" {args} /> |
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