MJML 전자 메일 라이브러리를 사용하여 React에서 전자 메일을 만들려고합니다. 그것은 반응을 실행하고 그것을 모두 작동하지만 두 섹션을 렌더링하는 대신 1 필요합니다. 내가 렌더링 할 때 제대로 크기가 서로 다른 웹 페이지에 나타나지 않습니다.React JS | 여러 요소 렌더링
배열 내에서 요소를 래핑하려고하면 반환 값은 null이되고 섹션 중 하나를 꺼내면 반환됩니다.
도움이 될만한 점은 여기에 코드가 있습니다.
render() {
const { mjAttribute } = this.props
const content = [this.renderEmailOverhead()]
const innerContent = [this.renderEmailBanner(), this.renderEmailTitle(), this.renderEmailText(), this.renderEmailDivider]
return ([
<Section full-width='full-width' padding-top="0">
{ content }
</Section>,
<Section>
{ innerContent }
</Section>
])
}
이것은 섹션이 전체 너비가 아니고 600px에서 유지된다는 사실 외의 것 같습니다. ( – cmiotk
이제 반대쪽 문제가 있습니다. 전체 너비가있는 섹션이 모든 것을 차지합니다. – cmiotk
렌더링 된 내용 style for "full width one" – Zargold