diff --git a/islands/NRF/HeroEditorTabbed.tsx b/islands/NRF/HeroEditorTabbed.tsx
index 8318d78e..0ddad423 100644
--- a/islands/NRF/HeroEditorTabbed.tsx
+++ b/islands/NRF/HeroEditorTabbed.tsx
@@ -1,52 +1,47 @@
import { useSignal } from "@preact/signals";
-import { SectionLibrary } from "deco-sites/starting/components/nrf/hero/SectionLibrary.tsx";
-import { NoCodeEditor } from "deco-sites/starting/components/nrf/hero/NoCodeEditor.tsx";
-import { FullCodeEditor } from "deco-sites/starting/components/nrf/hero/FullCodeEditor.tsx";
-import { WebAnalytics } from "deco-sites/starting/components/nrf/hero/WebAnalytics.tsx";
-import { Monitoring } from "deco-sites/starting/components/nrf/hero/Monitoring.tsx";
+import type { ImageWidget } from "apps/admin/widgets.ts";
-const TABS = [
- "Section Library",
- "No Code Editor",
- "Full Code Editor",
- "Web Analytics",
- "Monitoring",
-];
+export interface Tab {
+ title: string;
+ image: ImageWidget;
+}
-const PANELS = [
- SectionLibrary,
- NoCodeEditor,
- FullCodeEditor,
- WebAnalytics,
- Monitoring,
-];
+export interface Props {
+ tabs?: Tab[];
+}
-export const HeroEditorTabbed = () => {
+export const HeroEditorTabbed = ({ tabs }: Props) => {
const selectedTab = useSignal(0);
return (
- {TABS.map((tab, index) => (
-
- ))}
+ {tabs &&
+ tabs.map((tab, index) => (
+
+ ))}
- {PANELS.map((panel, index) => (
-
- {panel()}
-
- ))}
+ {tabs &&
+ tabs.map((tab, index) => (
+
+
+
+ ))}
);
diff --git a/sections/NRF/Hero.tsx b/sections/NRF/Hero.tsx
index b58f1e8b..576e724a 100644
--- a/sections/NRF/Hero.tsx
+++ b/sections/NRF/Hero.tsx
@@ -1,4 +1,7 @@
-import { HeroEditorTabbed } from "deco-sites/starting/islands/NRF/HeroEditorTabbed.tsx";
+import {
+ HeroEditorTabbed,
+ Tab,
+} from "deco-sites/starting/islands/NRF/HeroEditorTabbed.tsx";
import type { ImageWidget } from "apps/admin/widgets.ts";
interface CTA {
@@ -6,6 +9,7 @@ interface CTA {
text: string;
variant: "Normal" | "Reverse";
}
+
export interface Props {
/**
* @format html
@@ -22,9 +26,10 @@ export interface Props {
mobileText?: string;
href?: string;
};
+ tabs?: Tab[];
}
-export default function Hero({ title, subtitle, cta, alert }: Props) {
+export default function Hero({ title, subtitle, cta, alert, tabs }: Props) {
return (
-
+
);