-
+
>
);
}
-function Aside({ title, drawer, children, maxWidth, class: _class = "" }: { title: string; drawer: string; children: ComponentChildren; maxWidth?: string; class?: string }) {
+function Aside({ title, drawer, children, class: _class = "" }: { title: string; drawer: string; children: ComponentChildren; maxWidth?: string; class?: string }) {
return (
diff --git a/components/ui/Drawer/islands.tsx b/components/ui/Drawer/islands.tsx
new file mode 100644
index 0000000..5ed1c9a
--- /dev/null
+++ b/components/ui/Drawer/islands.tsx
@@ -0,0 +1,45 @@
+import { type ComponentChildren } from "preact";
+import { clx } from "../../../sdk/clx.ts";
+import { useId } from "../../../sdk/useId.ts";
+import { IconCloseDrawer } from "../../Icons/IconCloseDrawer.tsx";
+export interface Props {
+ open?: boolean;
+ class?: string;
+ children?: ComponentChildren;
+ aside: ComponentChildren;
+ id?: string;
+}
+
+function DrawerForIslands({ children, aside, open, class: _class = "", id = useId() }: Props) {
+ return (
+ <>
+
+ >
+ );
+}
+function Aside({ title, drawer, children, class: _class = "" }: { title: string; drawer: string; children: ComponentChildren; maxWidth?: string; class?: string }) {
+ return (
+
+
+
+ {title}
+
+
+
+ {children}
+
+ );
+}
+DrawerForIslands.Aside = Aside;
+export default DrawerForIslands;
diff --git a/components/ui/Icon.tsx b/components/ui/Icon.tsx
index 71346c8..737a19c 100644
--- a/components/ui/Icon.tsx
+++ b/components/ui/Icon.tsx
@@ -1,7 +1,7 @@
import { asset } from "$fresh/runtime.ts";
import type { JSX } from "preact";
-export type AvailableIcons = "search" | "shopping_bag" | "menu" | "account_circle" | "close" | "chevron-right" | "favorite" | "home_pin" | "call" | "local_shipping" | "pan_zoom" | "share" | "sell" | "check-circle" | "error" | "trash" | "close-search";
+export type AvailableIcons = "search" | "shopping_bag" | "menu" | "account_circle" | "close" | "chevron-right" | "favorite" | "home_pin" | "call" | "local_shipping" | "pan_zoom" | "share" | "sell" | "check-circle" | "error" | "trash" | "location_pin" | "close-search";
interface Props extends JSX.SVGAttributes
{
/**
diff --git a/components/ui/Input.tsx b/components/ui/Input.tsx
index 931f7fd..5db8f3e 100644
--- a/components/ui/Input.tsx
+++ b/components/ui/Input.tsx
@@ -1,6 +1,8 @@
import { clx } from "../../sdk/clx.ts";
-export default function Input(props: JSX.IntrinsicElements["input"]) {
+type InputProps = React.DetailedHTMLProps, HTMLInputElement>;
+
+export default function Input(props: InputProps) {
const { className, ...rest } = props;
- return ;
+ return ;
}
diff --git a/components/ui/QuantitySelector.tsx b/components/ui/QuantitySelector.tsx
index 5788499..910aed2 100644
--- a/components/ui/QuantitySelector.tsx
+++ b/components/ui/QuantitySelector.tsx
@@ -14,18 +14,20 @@ const onClick = (delta: number) => {
input.dispatchEvent(new Event("change", { bubbles: true }));
};
-type QuantitySelectorProps = JSX.IntrinsicElements["input"] & {
+type InputProps = React.DetailedHTMLProps, HTMLInputElement>;
+
+type QuantitySelectorProps = InputProps & {
small?: boolean;
};
-function QuantitySelector({ id = useId(), disabled, small, ...props }: QuantitySelectorProps) {
+function QuantitySelector({ id = useId(), disabled, className, ...props }: QuantitySelectorProps) {
return (
-
+