@etsoo/materialui
Version:
TypeScript Material-UI Implementation
17 lines (16 loc) • 825 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import Button from "@mui/material/Button";
import ButtonGroup from "@mui/material/ButtonGroup";
import { useAppContext } from "./app/ReactApp";
/**
* Down & Up Button
* @param props Props
* @returns Component
*/
export function DownUpButton(props) {
// Global app
const app = useAppContext();
// Destruct
const { size = "small", downDisabled, downLabel = app?.get("moveDown") ?? "Down", upDisabled, upLabel = app?.get("moveUp") ?? "Up", onDownClick, onUpClick, ...rest } = props;
return (_jsxs(ButtonGroup, { orientation: "vertical", size: size, ...rest, children: [_jsx(Button, { disabled: upDisabled, onClick: onUpClick, children: upLabel }), _jsx(Button, { disabled: downDisabled, onClick: onDownClick, children: downLabel })] }));
}