mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-04-20 08:16:38 +02:00
603 B
603 B
RebootButton component is a button that opens a modal dialog to confirm the reboot of the device.
Usage
import React, { useEffect, createContext } from "react";
import RebootButton from "./RebootButton";
import { AlertContextProvider } from "../context/alertContext/AlertContext";
window.AlertContext = React.createContext();
const RebootButtonExample = () => {
return (
<AlertContextProvider>
<div id="modal-container" />
<div id="alert-container" />
<RebootButton />
</AlertContextProvider>
);
};
<RebootButtonExample />;