import React, { Component, createRef, RefObject } from 'react'; import HeroCrop from '../../../assets/img/hero-crop.svg'; import { HeroContainer, BlockProduct } from '../../../styles/components/main/product/Hero.style'; import { Tooltip } from '../../shared/Tooltip'; import { Link } from '../../../styles/components/shared/Link.style'; import { PrismicElement, PrismicImage, PrismicLink } from 'easy-prismic-react'; import RichText from '../../RichText'; export interface HeroComponent { getHeight: () => number; } interface Props { name: string; CTALink: PrismicLink; shortName: string; shortDescription: PrismicElement; illustration: PrismicImage; startingPrice: string; hoverText: PrismicElement; } class Hero extends Component implements HeroComponent { refContent: RefObject = createRef(); public getHeight(): number { return this.refContent.current.offsetHeight + this.refContent.current.offsetTop; } render(): React.ReactElement { const { name, CTALink, shortDescription, illustration, startingPrice, hoverText, shortName } = this.props; return (
{illustration.alt}

{name}

Assurance professionnelle à partir de :
{startingPrice} € } > Je trouve mon offre Déjà un contrat {shortName} en cours ?
Easyblue prend en charge votre résiliation
); } } export default Hero;