Skip to content

PUIMutableBinaryStatus

Elijah Cobb edited this page May 13, 2021 · 3 revisions

This component allows the user to change a boolean state variable.

import {PUIMutableBinaryStatus} from "./pstdl-ui";
import {ReactElement, useState} from "react";

export function TestBed(): ReactElement {

	const [isOn, setIsOn] = useState(true);

	return <div className={"TestBed"}>
		<PUIMutableBinaryStatus
			value={isOn}
			setValue={setIsOn}
			label={"Front Lights"}
		/>
	</div>
}

image-20210513190038912

Clone this wiki locally