I have an email component made in react, but I want to have its body text on different lines.
Here's the component:
export const Mailto = ({ email, subject = '', body = '', children }) =>
{
let params = subject || body ? '?' : '';
if (subject) params += `subject=${encodeURIComponent(subject)}`;
if (body) params += `${subject ? '&' : ''}body=${encodeURIComponent(body)}`;
return <a href={`mailto:${email}${params}`}>{children}</a>;
};