Skip to content

add a mobile preview as well #6

Closed

Description

@oppianmatt

what a wonderful project. I gave it a try and was amazed. I wanted a mobile view also so I changed Preview.tsx to return 2 iframes like so:

  return (
    <div className="flex">
      <iframe
        title="Preview"
        srcDoc={throttledCode}
        className="border-[4px] border-black rounded-[20px] shadow-lg 
        transform scale-[0.8] origin-top-left w-[400px] h-[832px]"
      ></iframe>
      <iframe
        title="Preview"
        srcDoc={throttledCode}
        className="border-[4px] border-black rounded-[20px] shadow-lg 
        transform scale-[0.8] origin-top-left w-[1280px] h-[832px]"
      ></iframe>
    </div>
  );
}

image

Activity

  1. abi commented on Nov 16, 2023

    @abi
    Owner

    Thanks for this! Will add this in.

  2. self-assigned this
    on Nov 16, 2023
  3. abi commented on Nov 16, 2023

    @abi
    Owner

    Added now, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions