@homebound/beam 2.130.0 → 2.132.1
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.
- package/dist/components/Button.js +3 -3
- package/dist/components/Layout/ScrollableParent.js +1 -1
- package/dist/components/Table/GridTable.d.ts +3 -0
- package/dist/components/Table/GridTable.js +22 -8
- package/dist/components/Table/sortRows.d.ts +1 -1
- package/dist/components/Table/sortRows.js +11 -10
- package/dist/components/Table/useSortState.d.ts +1 -1
- package/dist/components/Table/useSortState.js +3 -1
- package/dist/components/internal/OverlayTrigger.js +1 -1
- package/dist/interfaces.d.ts +1 -1
- package/dist/utils/getInteractiveElement.d.ts +3 -0
- package/dist/utils/getInteractiveElement.js +10 -0
- package/package.json +1 -1
|
@@ -4,10 +4,10 @@ exports.Button = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const react_aria_1 = require("react-aria");
|
|
7
|
-
const react_router_dom_1 = require("react-router-dom");
|
|
8
7
|
const components_1 = require("./");
|
|
9
8
|
const Css_1 = require("../Css");
|
|
10
9
|
const utils_1 = require("../utils");
|
|
10
|
+
const getInteractiveElement_1 = require("../utils/getInteractiveElement");
|
|
11
11
|
const useTestIds_1 = require("../utils/useTestIds");
|
|
12
12
|
function Button(props) {
|
|
13
13
|
const { onClick: onPress, disabled, endAdornment, menuTriggerProps, tooltip, openInNew, download, contrast = false, ...otherProps } = props;
|
|
@@ -38,6 +38,7 @@ function Button(props) {
|
|
|
38
38
|
...buttonProps,
|
|
39
39
|
...focusProps,
|
|
40
40
|
...hoverProps,
|
|
41
|
+
className: typeof onPress === "string" ? components_1.navLink : undefined,
|
|
41
42
|
css: {
|
|
42
43
|
...Css_1.Css.buttonBase.tt("inherit").$,
|
|
43
44
|
...baseStyles,
|
|
@@ -48,12 +49,11 @@ function Button(props) {
|
|
|
48
49
|
},
|
|
49
50
|
...tid,
|
|
50
51
|
};
|
|
51
|
-
const button = typeof onPress === "string" ? ((0, utils_1.isAbsoluteUrl)(onPress) || openInNew || download ? ((0, jsx_runtime_1.jsx)("a", Object.assign({}, buttonAttrs, { href: onPress, className: components_1.navLink }, (download ? { download: "" } : { target: "_blank", rel: "noreferrer noopener" }), { children: buttonContent }), void 0)) : ((0, jsx_runtime_1.jsx)(react_router_dom_1.Link, Object.assign({}, buttonAttrs, { to: onPress, className: components_1.navLink }, { children: buttonContent }), void 0))) : ((0, jsx_runtime_1.jsx)("button", Object.assign({}, buttonAttrs, { children: buttonContent }), void 0));
|
|
52
52
|
// If we're disabled b/c of a non-boolean ReactNode, or the caller specified tooltip text, then show it in a tooltip
|
|
53
53
|
return (0, components_1.maybeTooltip)({
|
|
54
54
|
title: (0, components_1.resolveTooltip)(disabled, tooltip),
|
|
55
55
|
placement: "top",
|
|
56
|
-
children:
|
|
56
|
+
children: (0, getInteractiveElement_1.getButtonOrLink)(buttonContent, onPress, buttonAttrs, openInNew, download),
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
exports.Button = Button;
|
|
@@ -31,7 +31,7 @@ function ScrollableParent(props) {
|
|
|
31
31
|
(0, react_1.useEffect)(() => {
|
|
32
32
|
scrollableRef.current.appendChild(scrollableEl);
|
|
33
33
|
}, [scrollableEl]);
|
|
34
|
-
return ((0, jsx_runtime_1.jsx)(ScrollableParentContext.Provider, Object.assign({ value: context }, { children: (0, jsx_runtime_1.jsxs)(Tag, Object.assign({ css: { ...Css_1.Css.mh0.mw0.fg1.df.fdc.$, ...otherXss } }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ css: Css_1.Css.
|
|
34
|
+
return ((0, jsx_runtime_1.jsx)(ScrollableParentContext.Provider, Object.assign({ value: context }, { children: (0, jsx_runtime_1.jsxs)(Tag, Object.assign({ css: { ...Css_1.Css.mh0.mw0.fg1.df.fdc.$, ...otherXss } }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ css: Css_1.Css.ml(context.pl).pr(context.pr).if(!hasScrollableContent).h100.overflowAuto.$ }, { children: children }), void 0), (0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.fg1.overflowAuto.ml(context.pl).pr(context.pr).$, ref: scrollableRef }, void 0)] }), void 0) }), void 0));
|
|
35
35
|
}
|
|
36
36
|
exports.ScrollableParent = ScrollableParent;
|
|
37
37
|
function useScrollableParent() {
|
|
@@ -121,6 +121,7 @@ export declare type GridSortConfig<S> = {
|
|
|
121
121
|
on: "client";
|
|
122
122
|
/** The optional initial column (index in columns) and direction to sort. */
|
|
123
123
|
initial?: [S | GridColumn<any>, Direction] | undefined;
|
|
124
|
+
caseSensitive?: boolean;
|
|
124
125
|
} | {
|
|
125
126
|
on: "server";
|
|
126
127
|
/** The current sort by value + direction (if server-side sorting). */
|
|
@@ -308,6 +309,8 @@ export declare type GridCellContent = {
|
|
|
308
309
|
typeScale?: Typography;
|
|
309
310
|
/** Allows the cell to stay in place when the user scrolls horizontally */
|
|
310
311
|
sticky?: "left" | "right";
|
|
312
|
+
/** If provided, content of the cell will be wrapped within a <button /> or <a /> tag depending on if the value is a function or a string. */
|
|
313
|
+
onClick?: () => {} | string;
|
|
311
314
|
};
|
|
312
315
|
declare type MaybeFn<T> = T | (() => T);
|
|
313
316
|
/**
|
|
@@ -45,6 +45,7 @@ const Css_1 = require("../../Css");
|
|
|
45
45
|
const hooks_1 = require("../../hooks");
|
|
46
46
|
const useRenderCount_1 = require("../../hooks/useRenderCount");
|
|
47
47
|
const utils_1 = require("../../utils");
|
|
48
|
+
const getInteractiveElement_1 = require("../../utils/getInteractiveElement");
|
|
48
49
|
const shallowEqual_1 = require("../../utils/shallowEqual");
|
|
49
50
|
const _1 = require(".");
|
|
50
51
|
exports.ASC = "ASC";
|
|
@@ -113,14 +114,14 @@ function GridTable(props) {
|
|
|
113
114
|
const columnSizes = (0, columnSizes_1.useSetupColumnSizes)(style, columns, tableRef, resizeTarget);
|
|
114
115
|
// Make a single copy of our current collapsed state, so we'll have a single observer.
|
|
115
116
|
const collapsedIds = (0, hooks_1.useComputed)(() => rowState.collapsedIds, [rowState]);
|
|
116
|
-
const [sortState, setSortKey, sortOn] = (0, useSortState_1.useSortState)(columns, props.sorting);
|
|
117
|
+
const [sortState, setSortKey, sortOn, caseSensitive] = (0, useSortState_1.useSortState)(columns, props.sorting);
|
|
117
118
|
const maybeSorted = (0, react_1.useMemo)(() => {
|
|
118
119
|
if (sortOn === "client" && sortState) {
|
|
119
120
|
// If using client-side sort, the sortState use S = number
|
|
120
|
-
return (0, sortRows_1.sortRows)(columns, rows, sortState);
|
|
121
|
+
return (0, sortRows_1.sortRows)(columns, rows, sortState, caseSensitive);
|
|
121
122
|
}
|
|
122
123
|
return rows;
|
|
123
|
-
}, [columns, rows, sortOn, sortState]);
|
|
124
|
+
}, [columns, rows, sortOn, sortState, caseSensitive]);
|
|
124
125
|
let hasTotalsRow = false;
|
|
125
126
|
// Filter rows - ensures parent rows remain in the list if any children match the filter.
|
|
126
127
|
const filterRows = (0, react_1.useCallback)((acc, row) => {
|
|
@@ -273,6 +274,11 @@ const renders = {
|
|
|
273
274
|
/** Renders table using divs with flexbox rows, which is the default render */
|
|
274
275
|
function renderDiv(style, id, columns, headerRows, totalsRows, filteredRows, firstRowMessage, _stickyHeader, firstLastColumnWidth, xss, _virtuosoRef, tableRef) {
|
|
275
276
|
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ ref: tableRef, css: {
|
|
277
|
+
// Use `fit-content` to ensure the width of the table takes up the full width of its content.
|
|
278
|
+
// Otherwise, the table's width would be that of its container, which may not be as wide as the table itself.
|
|
279
|
+
// In cases where we have sticky columns on a very wide table, then the container which the columns "stick" to (which is the table),
|
|
280
|
+
// needs to be as wide as the table's content, or else we lose the "stickiness" once scrolling past width of the table's container.
|
|
281
|
+
...Css_1.Css.mw("fit-content").$,
|
|
276
282
|
/*
|
|
277
283
|
Using (n + 3) here to target all rows that are after the first non-header row. Since n starts at 0, we can use
|
|
278
284
|
the + operator as an offset.
|
|
@@ -643,9 +649,9 @@ function isJSX(content) {
|
|
|
643
649
|
return typeof content === "object" && content && "type" in content && "props" in content;
|
|
644
650
|
}
|
|
645
651
|
/** If a column def return just string text for a given row, apply some default styling. */
|
|
646
|
-
function toContent(
|
|
647
|
-
var _a;
|
|
648
|
-
content = isGridCellContent(
|
|
652
|
+
function toContent(maybeContent, isHeader, canSortColumn, isClientSideSorting, style, as, alignment) {
|
|
653
|
+
var _a, _b;
|
|
654
|
+
let content = isGridCellContent(maybeContent) ? maybeContent.content : maybeContent;
|
|
649
655
|
if (typeof content === "function") {
|
|
650
656
|
// Actually create the JSX by calling `content()` here (which should be as late as
|
|
651
657
|
// possible, i.e. only for visible rows if we're in a virtual table).
|
|
@@ -662,11 +668,19 @@ function toContent(content, isHeader, canSortColumn, isClientSideSorting, style,
|
|
|
662
668
|
// for those tables.
|
|
663
669
|
throw new Error("GridTables with as=virtual & sortable columns should use functions that return JSX, instead of JSX");
|
|
664
670
|
}
|
|
671
|
+
content =
|
|
672
|
+
isGridCellContent(maybeContent) && !!maybeContent.onClick
|
|
673
|
+
? (0, getInteractiveElement_1.getButtonOrLink)(content, maybeContent.onClick, {
|
|
674
|
+
css: Css_1.Css.maxw100.lightBlue700.if(((_a = style === null || style === void 0 ? void 0 : style.presentationSettings) === null || _a === void 0 ? void 0 : _a.wrap) === false).truncate.$,
|
|
675
|
+
})
|
|
676
|
+
: content;
|
|
665
677
|
if (content && typeof content === "string" && isHeader && canSortColumn) {
|
|
666
678
|
return (0, jsx_runtime_1.jsx)(SortHeader_1.SortHeader, { content: content, iconOnLeft: alignment === "right" }, void 0);
|
|
667
679
|
}
|
|
668
|
-
else if (content &&
|
|
669
|
-
|
|
680
|
+
else if (content && ((_b = style === null || style === void 0 ? void 0 : style.presentationSettings) === null || _b === void 0 ? void 0 : _b.wrap) === false && typeof content === "string") {
|
|
681
|
+
// In order to truncate the text properly, then we need to wrap it in another element
|
|
682
|
+
// as our cell element is a flex container, which don't allow for applying truncation styles directly on it.
|
|
683
|
+
return ((0, jsx_runtime_1.jsx)("span", Object.assign({ css: Css_1.Css.truncate.mw0.$, title: content }, { children: content }), void 0));
|
|
670
684
|
}
|
|
671
685
|
else if (style.emptyCell && isContentEmpty(content)) {
|
|
672
686
|
// If the content is empty and the user specified an `emptyCell` node, return that.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { GridCellContent, GridColumn, GridDataRow, Kinded } from "./GridTable";
|
|
3
3
|
import { SortOn, SortState } from "./useSortState";
|
|
4
|
-
export declare function sortRows<R extends Kinded>(columns: GridColumn<R>[], rows: GridDataRow<R>[], sortState: SortState<number
|
|
4
|
+
export declare function sortRows<R extends Kinded>(columns: GridColumn<R>[], rows: GridDataRow<R>[], sortState: SortState<number>, caseSensitive: boolean): GridDataRow<R>[];
|
|
5
5
|
export declare function ensureClientSideSortValueIsSortable(sortOn: SortOn, isHeader: boolean, column: GridColumn<any>, idx: number, maybeContent: ReactNode | GridCellContent): void;
|
|
@@ -3,26 +3,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ensureClientSideSortValueIsSortable = exports.sortRows = void 0;
|
|
4
4
|
const GridTable_1 = require("./GridTable");
|
|
5
5
|
// Returns a shallow copy of the `rows` parameter sorted based on `sortState`
|
|
6
|
-
function sortRows(columns, rows, sortState) {
|
|
7
|
-
const sorted = sortBatch(columns, rows, sortState);
|
|
6
|
+
function sortRows(columns, rows, sortState, caseSensitive) {
|
|
7
|
+
const sorted = sortBatch(columns, rows, sortState, caseSensitive);
|
|
8
8
|
// Recursively sort child rows
|
|
9
9
|
sorted.forEach((row, i) => {
|
|
10
10
|
if (row.children) {
|
|
11
|
-
sorted[i].children = sortRows(columns, row.children, sortState);
|
|
11
|
+
sorted[i].children = sortRows(columns, row.children, sortState, caseSensitive);
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
return sorted;
|
|
15
15
|
}
|
|
16
16
|
exports.sortRows = sortRows;
|
|
17
|
-
function sortBatch(columns, batch, sortState) {
|
|
17
|
+
function sortBatch(columns, batch, sortState, caseSensitive) {
|
|
18
18
|
// When client-side sort, the sort value is the column index
|
|
19
19
|
const [value, direction] = sortState;
|
|
20
20
|
const column = columns[value];
|
|
21
21
|
const invert = direction === "DESC";
|
|
22
22
|
// Make a shallow copy for sorting to avoid mutating the original list
|
|
23
23
|
return [...batch].sort((a, b) => {
|
|
24
|
-
const v1 = sortValue((0, GridTable_1.applyRowFn)(column, a, {}, 0));
|
|
25
|
-
const v2 = sortValue((0, GridTable_1.applyRowFn)(column, b, {}, 0));
|
|
24
|
+
const v1 = sortValue((0, GridTable_1.applyRowFn)(column, a, {}, 0), caseSensitive);
|
|
25
|
+
const v2 = sortValue((0, GridTable_1.applyRowFn)(column, b, {}, 0), caseSensitive);
|
|
26
26
|
const v1e = v1 === null || v1 === undefined;
|
|
27
27
|
const v2e = v2 === null || v2 === undefined;
|
|
28
28
|
if (a.pin || b.pin) {
|
|
@@ -43,7 +43,7 @@ function sortBatch(columns, batch, sortState) {
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
/** Look at a row and get its sort value. */
|
|
46
|
-
function sortValue(value) {
|
|
46
|
+
function sortValue(value, caseSensitive) {
|
|
47
47
|
// Check sortValue and then fallback on value
|
|
48
48
|
let maybeFn = value;
|
|
49
49
|
if (value && typeof value === "object") {
|
|
@@ -60,13 +60,14 @@ function sortValue(value) {
|
|
|
60
60
|
}
|
|
61
61
|
// Watch for functions that need to read from a potentially-changing proxy
|
|
62
62
|
if (maybeFn instanceof Function) {
|
|
63
|
-
|
|
63
|
+
maybeFn = maybeFn();
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
// If it is a string, then always lower case it for comparisons
|
|
66
|
+
return typeof maybeFn === "string" && !caseSensitive ? maybeFn.toLowerCase() : maybeFn;
|
|
66
67
|
}
|
|
67
68
|
function ensureClientSideSortValueIsSortable(sortOn, isHeader, column, idx, maybeContent) {
|
|
68
69
|
if (process.env.NODE_ENV !== "production" && !isHeader && sortOn === "client" && column.clientSideSort !== false) {
|
|
69
|
-
const value = sortValue(maybeContent);
|
|
70
|
+
const value = sortValue(maybeContent, false);
|
|
70
71
|
if (!canClientSideSort(value)) {
|
|
71
72
|
throw new Error(`Column ${idx} passed an unsortable value, use GridCellContent or clientSideSort=false`);
|
|
72
73
|
}
|
|
@@ -10,5 +10,5 @@ import { Direction, GridColumn, GridSortConfig, Kinded } from "./GridTable";
|
|
|
10
10
|
export declare type SortState<S> = readonly [S, Direction];
|
|
11
11
|
export declare type SortOn = "client" | "server" | undefined;
|
|
12
12
|
/** Small custom hook that wraps the "setSortColumn inverts the current sort" logic. */
|
|
13
|
-
export declare function useSortState<R extends Kinded, S>(columns: GridColumn<R, S>[], sorting?: GridSortConfig<S>): [SortState<S> | undefined, (value: S) => void, SortOn];
|
|
13
|
+
export declare function useSortState<R extends Kinded, S>(columns: GridColumn<R, S>[], sorting?: GridSortConfig<S>): [SortState<S> | undefined, (value: S) => void, SortOn, boolean];
|
|
14
14
|
export declare function deriveSortState<S>(currentSortState: SortState<S> | undefined, clickedKey: S, initialSortState: SortState<S> | undefined): SortState<S> | undefined;
|
|
@@ -47,7 +47,9 @@ function useSortState(columns, sorting) {
|
|
|
47
47
|
},
|
|
48
48
|
// Note that sorting.onSort is not listed here, so we bind to whatever the 1st sorting.onSort was
|
|
49
49
|
[initialSortState, sortState, onSort]);
|
|
50
|
-
|
|
50
|
+
// If sorting is done on the client, the by default the sort will NOT be case sensitive
|
|
51
|
+
const caseSensitive = (sorting === null || sorting === void 0 ? void 0 : sorting.on) === "client" ? !!sorting.caseSensitive : false;
|
|
52
|
+
return [sortState, setSortKey, sorting === null || sorting === void 0 ? void 0 : sorting.on, caseSensitive];
|
|
51
53
|
}
|
|
52
54
|
exports.useSortState = useSortState;
|
|
53
55
|
// Exported for testing purposes
|
|
@@ -23,7 +23,7 @@ function OverlayTrigger(props) {
|
|
|
23
23
|
placement: (placement ? `bottom ${placement}` : "bottom left"),
|
|
24
24
|
});
|
|
25
25
|
const tid = (0, utils_1.useTestIds)(props, isTextButton(trigger) ? (0, defaultTestId_1.defaultTestId)(trigger.label) : trigger.icon);
|
|
26
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ css: Css_1.Css.relative.dib.$ }, { children: [isTextButton(trigger) ? ((0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({ variant: "secondary" }, trigger, { menuTriggerProps: menuTriggerProps, buttonRef: buttonRef, endAdornment: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: state.isOpen ? "chevronUp" : "chevronDown" }, void 0), disabled: disabled, tooltip: tooltip }, tid), void 0)) : ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, Object.assign({}, trigger, { menuTriggerProps: menuTriggerProps, buttonRef: buttonRef }, tid), void 0)), state.isOpen && ((0, jsx_runtime_1.jsx)(internal_1.Popover, Object.assign({ triggerRef: buttonRef, popoverRef: popoverRef, positionProps: positionProps, onClose: () => state.close(), isOpen: state.isOpen }, { children: children }), void 0))] }), void 0));
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ css: Css_1.Css.relative.dib.$ }, { children: [isTextButton(trigger) ? ((0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({ variant: "secondary" }, trigger, { menuTriggerProps: menuTriggerProps, buttonRef: buttonRef, endAdornment: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: state.isOpen ? "chevronUp" : "chevronDown" }, void 0), disabled: disabled, tooltip: tooltip, onClick: utils_1.noop }, tid), void 0)) : ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, Object.assign({}, trigger, { menuTriggerProps: menuTriggerProps, buttonRef: buttonRef }, tid, { onClick: utils_1.noop }), void 0)), state.isOpen && ((0, jsx_runtime_1.jsx)(internal_1.Popover, Object.assign({ triggerRef: buttonRef, popoverRef: popoverRef, positionProps: positionProps, onClose: () => state.close(), isOpen: state.isOpen }, { children: children }), void 0))] }), void 0));
|
|
27
27
|
}
|
|
28
28
|
exports.OverlayTrigger = OverlayTrigger;
|
|
29
29
|
function isTextButton(trigger) {
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface BeamButtonProps {
|
|
|
16
16
|
*/
|
|
17
17
|
disabled?: boolean | ReactNode;
|
|
18
18
|
/** If function, then it is the handler that is called when the press is released over the target. Otherwise if string, it is the URL path for the link */
|
|
19
|
-
onClick
|
|
19
|
+
onClick: ((e: PressEvent) => void) | string;
|
|
20
20
|
/** Text to be shown via a tooltip when the user hovers over the button */
|
|
21
21
|
tooltip?: ReactNode;
|
|
22
22
|
/** Whether to open link in a new tab. This only effects the element if the `onClick` is a `string`/URL. */
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PressEvent } from "@react-types/shared";
|
|
2
|
+
import { HTMLAttributes, ReactNode } from "react";
|
|
3
|
+
export declare function getButtonOrLink(content: ReactNode, onClick: ((e: PressEvent) => void) | string, attrs: HTMLAttributes<HTMLButtonElement | HTMLAnchorElement>, openInNew?: boolean, downloadLink?: boolean): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getButtonOrLink = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const react_router_dom_1 = require("react-router-dom");
|
|
6
|
+
const index_1 = require("./index");
|
|
7
|
+
function getButtonOrLink(content, onClick, attrs, openInNew = false, downloadLink = false) {
|
|
8
|
+
return typeof onClick === "string" ? ((0, index_1.isAbsoluteUrl)(onClick) || openInNew || downloadLink ? ((0, jsx_runtime_1.jsx)("a", Object.assign({}, attrs, { href: onClick }, (downloadLink ? { download: "" } : { target: "_blank", rel: "noreferrer noopener" }), { children: content }), void 0)) : ((0, jsx_runtime_1.jsx)(react_router_dom_1.Link, Object.assign({}, attrs, { to: onClick }, { children: content }), void 0))) : ((0, jsx_runtime_1.jsx)("button", Object.assign({}, attrs, { children: content }), void 0));
|
|
9
|
+
}
|
|
10
|
+
exports.getButtonOrLink = getButtonOrLink;
|