@acvl/frontend-components 0.0.31 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,7 @@ export interface DetailPageProps {
9
9
  slots?: {
10
10
  title?: string[];
11
11
  button?: ReactNode;
12
+ extraButtons?: ((id: number) => ReactNode)[];
12
13
  badge?: string;
13
14
  };
14
15
  slotProps?: {
package/dist/esm/index.js CHANGED
@@ -28494,7 +28494,8 @@ function DetailPage(props) {
28494
28494
  if (props.pageType == "detail") {
28495
28495
  if (!canEdit && !canDelete)
28496
28496
  return null;
28497
- return (jsxs(Stack, { direction: "row", spacing: 1, children: [canDelete && props.api.delete && (jsx(DeleteButton, { mutation: props.api.delete.mutation, disableNavBack: props.slotProps?.deleteButton?.disableNavBack })), canEdit && jsx(EditButton, {})] }));
28497
+ return (jsxs(Stack, { direction: "row", spacing: 1, children: [canDelete && props.api.delete && (jsx(DeleteButton, { mutation: props.api.delete.mutation, disableNavBack: props.slotProps?.deleteButton?.disableNavBack })), canEdit && jsx(EditButton, {}), props.slots?.extraButtons &&
28498
+ map(props.slots.extraButtons, (btn) => btn(data?.id))] }));
28498
28499
  }
28499
28500
  else {
28500
28501
  return (jsx(SaveCancelButton, { slotProps: {