summaryrefslogtreecommitdiffstats
path: root/src/components/molecules/layout
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/molecules/layout')
-rw-r--r--src/components/molecules/layout/branding.tsx12
-rw-r--r--src/components/molecules/layout/card.tsx8
-rw-r--r--src/components/molecules/layout/flipping-logo.tsx10
-rw-r--r--src/components/molecules/layout/meta.tsx4
-rw-r--r--src/components/molecules/layout/widget.tsx10
5 files changed, 23 insertions, 21 deletions
diff --git a/src/components/molecules/layout/branding.tsx b/src/components/molecules/layout/branding.tsx
index 9f564bf..9fe89e7 100644
--- a/src/components/molecules/layout/branding.tsx
+++ b/src/components/molecules/layout/branding.tsx
@@ -1,11 +1,11 @@
import Heading from '@components/atoms/headings/heading';
import Link from 'next/link';
-import { VFC } from 'react';
+import { FC } from 'react';
import { useIntl } from 'react-intl';
import styles from './branding.module.scss';
-import FlippingLogo from './flipping-logo';
+import FlippingLogo, { type FlippingLogoProps } from './flipping-logo';
-type BrandingProps = {
+export type BrandingProps = Pick<FlippingLogoProps, 'photo'> & {
/**
* The Branding baseline.
*/
@@ -15,10 +15,6 @@ type BrandingProps = {
*/
isHome?: boolean;
/**
- * A photography URL.
- */
- photo: string;
- /**
* The Branding title;
*/
title: string;
@@ -33,7 +29,7 @@ type BrandingProps = {
*
* Render the branding logo, title and optional baseline.
*/
-const Branding: VFC<BrandingProps> = ({
+const Branding: FC<BrandingProps> = ({
baseline,
isHome = false,
photo,
diff --git a/src/components/molecules/layout/card.tsx b/src/components/molecules/layout/card.tsx
index 23a0e54..89f100e 100644
--- a/src/components/molecules/layout/card.tsx
+++ b/src/components/molecules/layout/card.tsx
@@ -1,11 +1,11 @@
import ButtonLink from '@components/atoms/buttons/button-link';
import Heading, { type HeadingLevel } from '@components/atoms/headings/heading';
import DescriptionList, {
- DescriptionListItem,
+ type DescriptionListItem,
} from '@components/atoms/lists/description-list';
-import { VFC } from 'react';
+import { FC } from 'react';
import ResponsiveImage, {
- ResponsiveImageProps,
+ type ResponsiveImageProps,
} from '../images/responsive-image';
import styles from './card.module.scss';
@@ -68,7 +68,7 @@ export type CardProps = {
*
* Render a link with minimal information about its content.
*/
-const Card: VFC<CardProps> = ({
+const Card: FC<CardProps> = ({
className = '',
cover,
coverFit = 'cover',
diff --git a/src/components/molecules/layout/flipping-logo.tsx b/src/components/molecules/layout/flipping-logo.tsx
index 6f7645f..4a216ef 100644
--- a/src/components/molecules/layout/flipping-logo.tsx
+++ b/src/components/molecules/layout/flipping-logo.tsx
@@ -1,9 +1,9 @@
-import Logo from '@components/atoms/images/logo';
+import Logo, { type LogoProps } from '@components/atoms/images/logo';
import Image from 'next/image';
-import { VFC } from 'react';
+import { FC } from 'react';
import styles from './flipping-logo.module.scss';
-type FlippingLogoProps = {
+export type FlippingLogoProps = {
/**
* Set additional classnames to the logo wrapper.
*/
@@ -15,7 +15,7 @@ type FlippingLogoProps = {
/**
* Logo image title.
*/
- logoTitle?: string;
+ logoTitle?: LogoProps['title'];
/**
* Photo url.
*/
@@ -27,7 +27,7 @@ type FlippingLogoProps = {
*
* Render a logo and a photo with a flipping effect.
*/
-const FlippingLogo: VFC<FlippingLogoProps> = ({
+const FlippingLogo: FC<FlippingLogoProps> = ({
className = '',
altText,
logoTitle,
diff --git a/src/components/molecules/layout/meta.tsx b/src/components/molecules/layout/meta.tsx
index 218ebd9..fcce473 100644
--- a/src/components/molecules/layout/meta.tsx
+++ b/src/components/molecules/layout/meta.tsx
@@ -2,7 +2,7 @@ import DescriptionList, {
type DescriptionListProps,
type DescriptionListItem,
} from '@components/atoms/lists/description-list';
-import { ReactNode, VFC } from 'react';
+import { FC, ReactNode } from 'react';
export type MetaItem = {
/**
@@ -43,7 +43,7 @@ export type MetaProps = {
*
* Renders the page metadata.
*/
-const Meta: VFC<MetaProps> = ({ data, ...props }) => {
+const Meta: FC<MetaProps> = ({ data, ...props }) => {
/**
* Transform the metadata to description list item format.
*
diff --git a/src/components/molecules/layout/widget.tsx b/src/components/molecules/layout/widget.tsx
index c04362a..feb2add 100644
--- a/src/components/molecules/layout/widget.tsx
+++ b/src/components/molecules/layout/widget.tsx
@@ -1,5 +1,7 @@
-import { FC, useState } from 'react';
-import HeadingButton, { HeadingButtonProps } from '../buttons/heading-button';
+import { FC, ReactNode, useState } from 'react';
+import HeadingButton, {
+ type HeadingButtonProps,
+} from '../buttons/heading-button';
import styles from './widget.module.scss';
export type WidgetProps = Pick<
@@ -7,6 +9,10 @@ export type WidgetProps = Pick<
'expanded' | 'level' | 'title'
> & {
/**
+ * The widget body.
+ */
+ children: ReactNode;
+ /**
* Set additional classnames to the widget wrapper.
*/
className?: string;