fix(section): `Column` inside `Section`
Merged
CA
4y ago+22+22+01234567890123456789-3-3-0123456789
This PR implements the issue https://github.com/zenorocha/react-email/issues/309 suggestion in order to correctly manage Column components as children.
type ReactEmailChild = {
type?: {
displayName?: string;
}
} & React.ReactNode;
...
const hasTdElement = (child: ReactEmailChild) => {
return React.isValidElement(child) && (child.type === "td" || child.type.displayName === "Column");
};