i forgot
This commit is contained in:
parent
30f2b4714d
commit
0c9f7a7822
21 changed files with 1868 additions and 1839 deletions
|
|
@ -7,16 +7,16 @@ import { ComponentChildren, h } from "preact";
|
|||
import { LinkIcon } from "./Icon.tsx";
|
||||
|
||||
interface PolygonBoxProps {
|
||||
as?: keyof HTMLElementTagNameMap;
|
||||
children?: ComponentChildren;
|
||||
[key: string]: any;
|
||||
as?: keyof HTMLElementTagNameMap;
|
||||
children?: ComponentChildren;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export default function Box(
|
||||
{ as: Tag = "span", class: className, children, ...props }: PolygonBoxProps,
|
||||
{ as: Tag = "span", class: className, children, ...props }: PolygonBoxProps,
|
||||
) {
|
||||
const content = Tag === "a"
|
||||
? [children, h(LinkIcon, { size: 16, class: "link-icon" })]
|
||||
: children;
|
||||
return h(Tag, { class: `box ${className || ""}`, ...props }, content);
|
||||
const content = Tag === "a"
|
||||
? [children, h(LinkIcon, { size: 16, class: "link-icon" })]
|
||||
: children;
|
||||
return h(Tag, { class: `box ${className || ""}`, ...props }, content);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue