How to use @react-email for tailwind styling?

Open
#20 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
react, tailwindcss, typescript

Research direction

Start from the project's Cloudflare Workers entry point and reproduce the supplied @react-email template with the reported styling setup. Review the existing example structure first; done means the project contains a working @react-email example that can build and send an email from a Cloudflare Worker.

Written by the indexing model from the issue text.

Description

I installed the @react-email and necessary dependency, but the email template doesn't work on Cloudflare worker? Can you add some example on this project working with @react-email to build templates.

import { Button, Html } from "@react-email/components";
import * as React from "react";

export default function Email() {
  return (
    <Html>
      <Button
        href="https://example.com"
        style={{ background: "#000", color: "#fff", padding: "12px 20px" }}
      >
        Click me
      </Button>
    </Html>
  );
}

This the error, when I send any of the email -

Image

Dominant language
TypeScript
Stars
41
Forks
13
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from resend/resend-cloudflare-workers-example

All issues in resend/resend-cloudflare-workers-example

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.