diff --git a/frontend/src/components/elements/SafetyButton.tsx b/frontend/src/components/elements/SafetyButton.tsx index 6230908..4d37860 100644 --- a/frontend/src/components/elements/SafetyButton.tsx +++ b/frontend/src/components/elements/SafetyButton.tsx @@ -5,11 +5,19 @@ import * as React from "react" import Style from "./SafetyButton.module.css" +/** + * Props of the {@link SafetyButton}. + */ export interface SafetyButtonProps extends ButtonProps { timeout: number, } +/** + * {@link Button} which locks for a certain `timeout` and asks for confirmation before firing the `onClick` event. + * + * @constructor + */ export function SafetyButton({timeout = 3, onClick, children, disabled, className, bluelibClassNames, ...props}: SafetyButtonProps): JSX.Element { const [timerStarted, setTimerStarted] = React.useState(false) const [timerElapsed, setTimerElapsed] = React.useState(false)