Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import { sanitizeIconSvg } from "~/utils/html-sanitizer";
|
||||
|
||||
export default function EntityIcon({ className, icon, title }: { className?: string; icon?: string; title?: string }) {
|
||||
return (
|
||||
<>
|
||||
{icon && (
|
||||
<>
|
||||
{icon.startsWith("<svg") ? (
|
||||
<div dangerouslySetInnerHTML={{ __html: sanitizeIconSvg(icon, className) }} />
|
||||
) : icon.includes("http") ? (
|
||||
<img className={className} src={icon} alt={title} />
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherShield } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherShield)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherBarChart2 } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherBarChart2)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherLayoutGrid } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherLayoutGrid)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherUsers } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherUsers)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherCode } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherCode)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherComponent } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherComponent)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherLayoutDashboard } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherLayoutDashboard)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherFileText } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherFileText)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherMail } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherMail)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherDatabase } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherDatabase)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherCalendar } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherCalendar)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherFlag } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherFlag)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherLifeBuoy } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherLifeBuoy)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherHistory } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherHistory)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherKey } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherKey)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherLink } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherLink)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherUsers } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherUsers)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherActivity } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherActivity)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherCompass } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherCompass)
|
||||
@@ -0,0 +1,15 @@
|
||||
import { renderToStaticMarkup } from "react-dom/server";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import IconNotifications from "./IconNotifications";
|
||||
|
||||
describe("IconNotifications", () => {
|
||||
it("forwards className onto a rendered Subframe Feather icon", () => {
|
||||
const markup = renderToStaticMarkup(<IconNotifications className="size-4" />);
|
||||
|
||||
// Migrated to the Subframe @subframe/core Feather icon set via the shared
|
||||
// icons/_feather wrapper, which forwards `className` onto the icon and
|
||||
// renders an <svg> (Feather uses a 24x24 viewBox).
|
||||
expect(markup).toContain("size-4");
|
||||
expect(markup).toContain("<svg");
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherBell } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherBell)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherRocket } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherRocket)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherFile } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherFile)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherGlobe } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherGlobe)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherUser } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherUser)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherSparkles } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherSparkles)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherPlug } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherPlug)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherShield } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherShield)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherSettings } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherSettings)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherBuilding2 } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherBuilding2)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherUsers } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherUsers)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherBox } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherBox)
|
||||
@@ -0,0 +1,5 @@
|
||||
import { FeatherWorkflow } from "@subframe/core"
|
||||
|
||||
import { featherIcon } from "~/components/ui/icons/_feather"
|
||||
|
||||
export default featherIcon(FeatherWorkflow)
|
||||
@@ -0,0 +1,33 @@
|
||||
import { ReactNode } from "react";
|
||||
import { sanitizeIconSvg } from "~/utils/html-sanitizer";
|
||||
|
||||
interface Props {
|
||||
className: string;
|
||||
item: {
|
||||
title?: string;
|
||||
icon?: ReactNode;
|
||||
};
|
||||
}
|
||||
|
||||
export default function SidebarIcon({ className, item }: Props) {
|
||||
let icon = item.icon;
|
||||
let title = item.title;
|
||||
if (typeof icon !== "string") {
|
||||
return icon;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
{icon && (
|
||||
<>
|
||||
{icon.startsWith("<svg") ? (
|
||||
<div dangerouslySetInnerHTML={{ __html: sanitizeIconSvg(icon, className) }} />
|
||||
) : icon.includes("http") ? (
|
||||
<img className={className} src={icon} alt={title} />
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user