mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
🛠️ Update `WithoutChild` type import + format scroll-area.ts file
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import Scrollbar from "./scroll-area-scrollbar.svelte";
|
||||
import Root from "./scroll-area.svelte";
|
||||
import Mask from "./scroll-area-mask.svelte";
|
||||
import Scrollbar from "./scroll-area-scrollbar.svelte";
|
||||
|
||||
export {
|
||||
Root,
|
||||
Scrollbar,
|
||||
Mask,
|
||||
//
|
||||
Root as ScrollArea,
|
||||
Scrollbar as ScrollAreaScrollbar,
|
||||
Mask as ScrollAreaMask,
|
||||
Root,
|
||||
Scrollbar,
|
||||
Mask,
|
||||
Root as ScrollArea,
|
||||
Scrollbar as ScrollAreaScrollbar,
|
||||
Mask as ScrollAreaMask,
|
||||
};
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<script lang="ts">
|
||||
import type { WithoutChild } from "@/types/components";
|
||||
|
||||
import { cn } from "@/utils/cn";
|
||||
import { ScrollArea as ScrollAreaPrimitive } from "bits-ui";
|
||||
import { cn, type WithoutChild } from "@/utils/cn";
|
||||
import { useHasPrimaryTouch } from "@/hooks/use-has-primary-touch";
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
<script lang="ts">
|
||||
import { cn, type WithoutChild } from "@/utils/cn";
|
||||
import { ScrollArea as ScrollAreaPrimitive } from "bits-ui";
|
||||
import type { WithoutChild } from "@/types/components";
|
||||
|
||||
import { cn } from "@/utils/cn";
|
||||
import { useHasPrimaryTouch } from "@/hooks/use-has-primary-touch";
|
||||
|
||||
import { Scrollbar } from "./index.js";
|
||||
import ScrollAreaMask from "./scroll-area-mask.svelte";
|
||||
import { useHasPrimaryTouch } from "@/hooks/use-has-primary-touch";
|
||||
import { ScrollArea as ScrollAreaPrimitive } from "bits-ui";
|
||||
|
||||
type Mask = {
|
||||
top: boolean;
|
||||
|
||||
+2
-13
@@ -1,17 +1,6 @@
|
||||
import { type ClassValue, clsx } from "clsx";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs));
|
||||
return twMerge(clsx(inputs));
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export type WithoutChild<T> = T extends { child?: any } ? Omit<T, "child"> : T;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export type WithoutChildren<T> = T extends { children?: any }
|
||||
? Omit<T, "children">
|
||||
: T;
|
||||
export type WithoutChildrenOrChild<T> = WithoutChildren<WithoutChild<T>>;
|
||||
export type WithElementRef<T, U extends HTMLElement = HTMLElement> = T & {
|
||||
ref?: U | null;
|
||||
};
|
||||
Reference in New Issue
Block a user