MCPcopy Index your code
hub / github.com/resend/react-email / renderToReactEmail

Function renderToReactEmail

packages/editor/src/extensions/container.tsx:162–184  ·  view source on GitHub ↗
({ children, node, style })

Source from the content-addressed store, hash-verified

160 },
161
162 renderToReactEmail({ children, node, style }) {
163 const inlineStyles = inlineCssToJs(node.attrs?.style);
164
165 return (
166 <ReactEmailContainer
167 className={node.attrs?.class || undefined}
168 align={
169 ((style as Record<string, unknown>).align as
170 | 'left'
171 | 'center'
172 | 'right') || 'center'
173 }
174 style={{
175 ...style,
176 ...inlineStyles,
177 width: '100%',
178 maxWidth: style?.width ?? style?.maxWidth,
179 }}
180 >
181 {children}
182 </ReactEmailContainer>
183 );
184 },
185});

Callers

nothing calls this directly

Calls 1

inlineCssToJsFunction · 0.90

Tested by

no test coverage detected