反应不渲染图像

时间:2020-12-21 08:21:43

标签: reactjs

array([1, 1])

请注意,这些是自定义标签。另外,我什至尝试创建一个对象并将文件链接存储在一个属性中并将该属性传递到标签中,但它也不起作用。任何帮助将不胜感激!

这是我描述 ImgWrapper 和 Img 的代码

import React from 'react'
import { Button } from '../ButtonElements';
import ImageOne from './svg-1.svg';

    import { InfoContainer,
            InfoWrapper,
            InfoRow,
            Column1,
            TextWrapper,
            TopLine,
            Heading,
            SubTitle,
            BtnWrap,
            Column2,
            ImgWrap,
            Img} from "./infoElements";

const InfoSection = ({lightBg,id,imgStart,topLine,headLine,darkText,description,buttonLabel,img,alt}) => {
    return (
        <>
            <InfoContainer lightBg= {lightBg} id={id} >
                <InfoWrapper>
                    <InfoRow imgStart={imgStart} >
                        <Column1>
                            <TextWrapper>
                                <TopLine>{topLine}</TopLine>
                                <Heading> {headLine} </Heading>
                                <SubTitle darkText={darkText}>{description}</SubTitle>
                                <BtnWrap>
                                    <Button to='home'>{buttonLabel}</Button>
                                </BtnWrap>
                            </TextWrapper>
                        </Column1>
                        <Column2>
                            <ImgWrap>
                                <Img alt={alt} src={ImageOne} />
                            </ImgWrap>
                        </Column2>
                    </InfoRow>
                </InfoWrapper>
            </InfoContainer>
        </>
    )
}

export default InfoSection

这是用于 Img 和 ImgWrap 在这里任何帮助将不胜感激!

0 个答案:

没有答案