Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ui fix for labels of sidebarNavItem #921

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<a
href={item.href}
class={cn(
"group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline",
"group w-full rounded-md border border-transparent px-2 py-1",
item.disabled && "cursor-not-allowed opacity-60",
$page.url.pathname === item.href
? "font-medium text-foreground"
Expand All @@ -22,10 +22,10 @@
target={item.external ? "_blank" : ""}
rel={item.external ? "noreferrer" : ""}
>
{item.title}
<span class="group-hover:underline">{item.title}</span>
{#if item.label}
<span
class="ml-2 rounded-md bg-[#adfa1d] px-1.5 py-0.5 text-xs leading-none text-[#000000] no-underline group-hover:no-underline"
class="ml-1 inline-block rounded-md bg-[#adfa1d] px-1.5 py-0.5 text-xs leading-none text-[#000000]"
>
{item.label}
</span>
Expand Down
11 changes: 5 additions & 6 deletions apps/www/src/lib/registry/default/ui/carousel/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import { getContext, hasContext, setContext } from "svelte";
import type { HTMLAttributes } from "svelte/elements";
import type { Writable, Readable } from "svelte/store";

export type CarouselAPI =
NonNullable<NonNullable<EmblaCarouselSvelteType["$$_attributes"]>["on:emblaInit"]> extends (
evt: CustomEvent<infer CarouselAPI>
) => void
? CarouselAPI
: never;
export type CarouselAPI = NonNullable<
NonNullable<EmblaCarouselSvelteType["$$_attributes"]>["on:emblaInit"]
> extends (evt: CustomEvent<infer CarouselAPI>) => void
? CarouselAPI
: never;

type EmblaCarouselConfig = NonNullable<Parameters<typeof emblaCarouselSvelte>[1]>;

Expand Down
11 changes: 5 additions & 6 deletions apps/www/src/lib/registry/new-york/ui/carousel/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import { getContext, hasContext, setContext } from "svelte";
import type { HTMLAttributes } from "svelte/elements";
import type { Writable, Readable } from "svelte/store";

export type CarouselAPI =
NonNullable<NonNullable<EmblaCarouselSvelteType["$$_attributes"]>["on:emblaInit"]> extends (
evt: CustomEvent<infer CarouselAPI>
) => void
? CarouselAPI
: never;
export type CarouselAPI = NonNullable<
NonNullable<EmblaCarouselSvelteType["$$_attributes"]>["on:emblaInit"]
> extends (evt: CustomEvent<infer CarouselAPI>) => void
? CarouselAPI
: never;

type EmblaCarouselConfig = NonNullable<Parameters<typeof emblaCarouselSvelte>[1]>;

Expand Down
Loading