mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-03-28 11:13:16 +00:00
42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
"use client";
|
|
|
|
import { useState } from "react";
|
|
import { createPortal } from "react-dom";
|
|
import { Icon } from "@iconify/react";
|
|
|
|
import Tutorial from ".";
|
|
|
|
export default function ScanTutorialButton() {
|
|
const [isOpen, setIsOpen] = useState(false);
|
|
|
|
return (
|
|
<>
|
|
<button aria-label="Tutorial" type="button" onClick={() => setIsOpen(true)} className="text-3xl cursor-pointer">
|
|
<Icon icon="fa:question-circle" />
|
|
<span>Tutorial</span>
|
|
</button>
|
|
|
|
{isOpen &&
|
|
createPortal(
|
|
<Tutorial
|
|
tutorials={[
|
|
{
|
|
title: "Adding Mii",
|
|
steps: [
|
|
{ text: "1. Enter the town hall", imageSrc: "/tutorial/step1.png" },
|
|
{ text: "2. Go into 'QR Code'", imageSrc: "/tutorial/adding-mii/step2.png" },
|
|
{ text: "3. Press 'Scan QR Code'", imageSrc: "/tutorial/adding-mii/step3.png" },
|
|
{ text: "4. Click on the QR code below the Mii's image", imageSrc: "/tutorial/adding-mii/step4.png" },
|
|
{ text: "5. Scan with your 3DS", imageSrc: "/tutorial/adding-mii/step5.png" },
|
|
{ type: "finish" },
|
|
],
|
|
},
|
|
]}
|
|
isOpen={isOpen}
|
|
setIsOpen={setIsOpen}
|
|
/>,
|
|
document.body,
|
|
)}
|
|
</>
|
|
);
|
|
}
|