@prismicio/editor-ui 0.4.50 → 0.4.51
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/Group/Group.d.ts +1 -1
- package/dist/components/Group/GroupItem.d.ts +5 -7
- package/dist/components/Group/context.d.ts +16 -12
- package/dist/index.cjs.js +158 -158
- package/dist/index.es.js +6326 -6290
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
2
|
interface Props {
|
|
3
|
-
index
|
|
3
|
+
index: number;
|
|
4
4
|
title?: string;
|
|
5
|
-
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
onMove?: (args: {
|
|
6
7
|
index: number;
|
|
7
8
|
offset: number;
|
|
8
9
|
}) => void;
|
|
9
|
-
onDelete?: (
|
|
10
|
-
index: number;
|
|
11
|
-
}) => void;
|
|
12
|
-
children?: ReactNode;
|
|
10
|
+
onDelete?: (index: number) => void;
|
|
13
11
|
}
|
|
14
12
|
export declare function GroupItem(props: Props): JSX.Element;
|
|
15
13
|
export {};
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
interface GroupProviderProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
itemCount: number;
|
|
5
|
+
draggable: boolean;
|
|
6
|
+
onAddItem?: (atIndex: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function GroupProvider(props: GroupProviderProps): JSX.Element;
|
|
9
|
+
interface GroupContextValue {
|
|
10
|
+
itemCount: number;
|
|
11
|
+
draggable: boolean;
|
|
12
|
+
activeItem?: number;
|
|
13
|
+
onActiveItemChange: (index: number, active: boolean) => void;
|
|
14
|
+
onAddItem?: (atIndex: number) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function useGroup(): GroupContextValue;
|
|
13
17
|
export {};
|