@eml-payments/ui-kit 0.1.8 → 0.1.10
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.
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { Slot } from '@radix-ui/react-slot';
|
|
4
4
|
import { cn } from '../../lib/utils';
|
|
5
5
|
import { Loader2Icon } from 'lucide-react';
|
|
6
|
-
import { buttonVariants } from '
|
|
6
|
+
import { buttonVariants } from './ButtonVariants';
|
|
7
7
|
export const Button = React.forwardRef(({ variant, size, asChild = false, loading = false, children, className, loadingText, ...props }, ref) => {
|
|
8
8
|
const Comp = asChild ? Slot : 'button';
|
|
9
9
|
return (_jsx(Comp, { className: cn(buttonVariants({ variant, size }), className), ref: ref, disabled: loading || props.disabled, ...props, children: _jsxs("span", { className: "flex items-center gap-2", children: [loading && _jsx(Loader2Icon, { className: "animate-spin" }), loading ? loadingText : children] }) }));
|
|
@@ -37,9 +37,6 @@ export function useTableController({ data, columns, checkboxSelection, checkboxP
|
|
|
37
37
|
useEffect(() => {
|
|
38
38
|
const normalized = applyFlexSizes(columns !== null && columns !== void 0 ? columns : []);
|
|
39
39
|
const selectionColumn = checkboxSelection ? getCheckboxSelectionColumn(table) : null;
|
|
40
|
-
if (checkboxSelection && !selectionColumn) {
|
|
41
|
-
throw new Error('selectionColumn must be defined when checkboxSelection is true.');
|
|
42
|
-
}
|
|
43
40
|
let finalColumns;
|
|
44
41
|
if (checkboxSelection && selectionColumn) {
|
|
45
42
|
if (checkboxPosition === 'start') {
|