import { customWidthAtom, useCustomWidthAtom } from "@/atoms/userSettingsAtom"; import { useAtom } from "jotai"; import React, { useState } from "react"; export function CustomResolutionInput() { const [useCustomWidth, setUseCustomWidth] = useAtom(useCustomWidthAtom); const [customWidth, setCustomWidth] = useAtom(customWidthAtom); return (

CUSTOM OUTPUT WIDTH

REQUIRES RESTART
Use a custom width for the output images. The height will be adjusted automatically. Enabling this will override the scale setting.

{ if (!e.currentTarget.checked) { localStorage.removeItem("customWidth"); } setUseCustomWidth(!useCustomWidth); }} /> { if (e.currentTarget.value === "") { setUseCustomWidth(false); setCustomWidth(null); localStorage.removeItem("customWidth"); return; } setCustomWidth(parseInt(e.currentTarget.value)); }} step="1" className="input input-primary mt-2 w-full" />
); }