add image-and-text and image slider block types
This commit is contained in:
25
web/src/components/blocks/ImageWithTextBlock.tsx
Normal file
25
web/src/components/blocks/ImageWithTextBlock.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import { ImageWithTextBlock as ImageWithTextBlockType } from "@/gql/graphql";
|
||||
import Image from "../general/Image";
|
||||
import styles from "./imageWithTextBlock.module.scss";
|
||||
|
||||
export const ImageWithTextBlock = ({
|
||||
block,
|
||||
}: {
|
||||
block: ImageWithTextBlockType;
|
||||
}) => {
|
||||
return (
|
||||
<div className={styles.imageWithTextBlock}>
|
||||
<Image
|
||||
src={block.image.url}
|
||||
alt={block.image.alt ?? ""}
|
||||
width={block.image.width}
|
||||
height={block.image.height}
|
||||
// width={0}
|
||||
// height={0}
|
||||
// sizes="20vw"
|
||||
/>
|
||||
<div>{block.imageFormat}</div>
|
||||
{block.text && <div>{block.text}</div>}
|
||||
</div>
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user