yogastic/yoga-app/src/components/text.with.image.component.tsx
2025-01-26 11:06:15 +01:00

17 lines
672 B
TypeScript

import TextWithRightImage from "@/components/text.with.right.image.component";
import TextWithLeftImage from "@/components/text.with.right.left.component";
import {YogaTextWithImageComponent_Plain} from "@/types/generated-strapi-interfaces/api/yoga-text-with-image-component";
export interface Props{
config: YogaTextWithImageComponent_Plain
}
export default function TextWithImageComponent({ config}: Props){
const {imagePosition} = config || {};
return (
<>
{ imagePosition == 'Right' && <TextWithRightImage config={config} /> }
{ imagePosition == 'Left' && <TextWithLeftImage config={config} /> }
</>
);
}