mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 14:44:15 +00:00
Fixes/adds: - ability to edit instructions - center indicator on range inputs - birthdays
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import { useState } from "react";
|
|
import { SwitchMiiInstructions } from "@/types";
|
|
import ColorPicker from "../color-picker";
|
|
import NumberInputs from "../number-inputs";
|
|
|
|
interface Props {
|
|
instructions: React.RefObject<SwitchMiiInstructions>;
|
|
}
|
|
|
|
export default function GlassesTab({ instructions }: Props) {
|
|
const [ringColor, setRingColor] = useState(instructions.current.glasses.ringColor ?? 133);
|
|
const [shadesColor, setShadesColor] = useState(instructions.current.glasses.shadesColor ?? 133);
|
|
|
|
return (
|
|
<>
|
|
<h1 className="absolute font-bold text-xl">Glasses</h1>
|
|
|
|
<div className="size-full flex flex-col justify-center items-center">
|
|
<ColorPicker
|
|
color={ringColor}
|
|
setColor={(i) => {
|
|
setRingColor(i);
|
|
instructions.current.glasses.ringColor = i;
|
|
}}
|
|
tab="glasses"
|
|
/>
|
|
<ColorPicker
|
|
color={shadesColor}
|
|
setColor={(i) => {
|
|
setShadesColor(i);
|
|
instructions.current.glasses.shadesColor = i;
|
|
}}
|
|
tab="glasses"
|
|
/>
|
|
<NumberInputs target={instructions.current.glasses} />
|
|
</div>
|
|
</>
|
|
);
|
|
}
|