UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

30 lines (29 loc) 677 B
import { jsx as c } from "react/jsx-runtime"; import { useState as u } from "react"; import { Button as b } from "@mui/material"; function D(s) { const { control: i, callbackData: t, disabled: e, ...r } = s, { onClick: a, buttonText: l, buttonID: d } = i, [o, n] = u(!1); return /* @__PURE__ */ c( b, { ...r, id: d, variant: "outlined", disabled: e || o, loading: o, onClick: () => { n(!0), a({ ...t, refresh: () => { n(!1), t.refresh(); } }); }, children: l } ); } export { D as CustomControlButton }; //# sourceMappingURL=CustomControlButton.js.map