Skip to content

Add <Timer> Component #24

@ericdellacasa8

Description

@ericdellacasa8

Context

@unlayer/exporters exposes TimerExporters and TimerDefaults, but Elements does not currently expose a React <Timer> component.

This should be a clean component addition following the same factory pattern used by existing components such as <Button> and <Divider>.

Definition of Done

Add a React <Timer> component to Elements.

The component should:

  • Use the existing TimerExporters and TimerDefaults
  • Follow the same factory pattern used by existing components
  • Render correctly across supported output modes
  • Be exported from the package entry point
  • Include a Storybook story
  • Include snapshot or render tests
  • Include basic usage documentation

Example Outcome

A developer should be able to import and use <Timer> like other Elements components.

For example:

import { Timer } from "@unlayer/elements";

export function PromoEmail() {
  return (
    <Timer />
  );
}

The component should behave consistently with the exporter-backed components already available in Elements.

Where to Start

Useful references already exist in the codebase:

  • packages/react/src/components/Button.tsx
  • packages/react/src/components/Divider.tsx
  • packages/react/src/utils/create-component.tsx
  • @unlayer/exporters Timer exports

The goal is to add <Timer> using the same pattern as existing exporter-backed components.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions