ab-ui-library 1.42.8 → 1.42.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.
|
@@ -168,7 +168,9 @@ var SideSheet = function SideSheet(props) {
|
|
|
168
168
|
})), /*#__PURE__*/React.createElement("div", {
|
|
169
169
|
className: "side-sheet__content scrollbar scrollbar--vertical",
|
|
170
170
|
ref: scrollbarContainerRef
|
|
171
|
-
}, children
|
|
171
|
+
}, typeof children === 'function' ? children({
|
|
172
|
+
scrollbarContainerRef: scrollbarContainerRef
|
|
173
|
+
}) : children), footerButtons ? /*#__PURE__*/React.createElement(Footer, {
|
|
172
174
|
footerButtons: footerButtons,
|
|
173
175
|
isLoading: isLoading,
|
|
174
176
|
onClose: onClose,
|
|
@@ -6,6 +6,9 @@ export type TCheckboxInfo = {
|
|
|
6
6
|
label: string;
|
|
7
7
|
isChecked: boolean;
|
|
8
8
|
};
|
|
9
|
+
export type TSideSheetChildren = {
|
|
10
|
+
scrollbarContainerRef?: RefObject<HTMLDivElement>;
|
|
11
|
+
};
|
|
9
12
|
export interface TSideSheetPropTypes {
|
|
10
13
|
closeOnOutsideClick?: boolean;
|
|
11
14
|
shouldRemoveCallback?: boolean;
|
|
@@ -24,7 +27,7 @@ export interface TSideSheetPropTypes {
|
|
|
24
27
|
topLeftActions?: ReactNode;
|
|
25
28
|
topRightActions?: ReactNode;
|
|
26
29
|
tabItemsProps?: TTabProps;
|
|
27
|
-
children?: ReactNode;
|
|
30
|
+
children?: ReactNode | (({ scrollbarContainerRef }: TSideSheetChildren) => ReactNode);
|
|
28
31
|
className?: string;
|
|
29
32
|
checkboxInfo?: TCheckboxInfo;
|
|
30
33
|
headerContent?: ReactNode;
|
package/context/types.d.ts
CHANGED
|
@@ -17,5 +17,6 @@ export type TFormContextProps = {
|
|
|
17
17
|
trigger?: UseFormTrigger<TFormData>;
|
|
18
18
|
getFieldState?: UseFormGetFieldState<TFormData>;
|
|
19
19
|
unregister?: UseFormUnregister<TFormData>;
|
|
20
|
+
isValid: boolean;
|
|
20
21
|
};
|
|
21
22
|
export declare const FormContext: import("react").Context<TFormContextProps>;
|
package/context/types.js
CHANGED