diff --git a/src/components/widgets/Hero.astro b/src/components/widgets/Hero.astro index e8ce3ee..e5243f7 100644 --- a/src/components/widgets/Hero.astro +++ b/src/components/widgets/Hero.astro @@ -1,31 +1,30 @@ --- import Image from '~/components/common/Image.astro'; import Button from '~/components/ui/Button.astro'; -import type { CallToAction } from '~/types'; +import Background from '~/components/ui/Background.astro'; -export interface Props { - id?: string; - title?: string; - subtitle?: string; - tagline?: string; - content?: string; - actions?: string | CallToAction[]; - image?: string | unknown; // TODO: find HTMLElementProps -} +import type { Hero as Props } from '~/types'; const { - id, title = await Astro.slots.render('title'), subtitle = await Astro.slots.render('subtitle'), tagline, + content = await Astro.slots.render('content'), actions = await Astro.slots.render('actions'), image = await Astro.slots.render('image'), + + id, + bg = await Astro.slots.render('bg'), } = Astro.props; ---
- +
diff --git a/src/components/widgets/Hero2.astro b/src/components/widgets/Hero2.astro index 6180265..09674e0 100644 --- a/src/components/widgets/Hero2.astro +++ b/src/components/widgets/Hero2.astro @@ -1,29 +1,30 @@ --- import Image from '~/components/common/Image.astro'; -import type { CallToAction } from '~/types'; import Button from '~/components/ui/Button.astro'; +import Background from '~/components/ui/Background.astro'; -export interface Props { - title?: string; - subtitle?: string; - tagline?: string; - content?: string; - actions?: string | CallToAction[]; - image?: string | unknown; // TODO: find HTMLElementProps -} +import type { Hero as Props } from '~/types'; const { title = await Astro.slots.render('title'), subtitle = await Astro.slots.render('subtitle'), tagline, + content = await Astro.slots.render('content'), actions = await Astro.slots.render('actions'), image = await Astro.slots.render('image'), + + id, + bg = await Astro.slots.render('bg'), } = Astro.props; --- -
- +
+
diff --git a/src/types.d.ts b/src/types.d.ts index 00ca163..6c4223b 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -213,12 +213,10 @@ export interface Form { } // WIDGETS -export interface Hero extends Omit, Widget { +export interface Hero extends Omit, Omit { content?: string; + actions?: string | CallToAction[]; image?: string | unknown; - callToAction1?: CallToAction; - callToAction2?: CallToAction; - isReversed?: boolean; } export interface Team extends Omit, Widget {