Skip to content

Commit

Permalink
chore(features): expose api
Browse files Browse the repository at this point in the history
  • Loading branch information
mgcrea committed Dec 20, 2023
1 parent 851edd9 commit 3d9902c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/features/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./sort";
5 changes: 2 additions & 3 deletions src/features/sort/components/DraggableGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useDraggableGrid, type UseDraggableGridOptions } from "../hooks/useDrag
export type DraggableGridProps = Pick<ViewProps, "style"> &
Pick<UseDraggableGridOptions, "onOrderChange" | "onOrderUpdate" | "shouldSwapWorklet"> & {
direction?: FlexStyle["flexDirection"];
size?: number;
size: number;
gap?: number;
};

Expand All @@ -17,13 +17,12 @@ export const DraggableGrid: FunctionComponent<PropsWithChildren<DraggableGridPro
onOrderChange,
onOrderUpdate,
shouldSwapWorklet,
size = 3,
size,
style: styleProp,
}) => {
const initialOrder = useMemo(
() =>
Children.map(children, (child) => {
// console.log("in");
if (React.isValidElement(child)) {
return child.props.id;
}
Expand Down
2 changes: 2 additions & 0 deletions src/features/sort/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from "./DraggableGrid";
export * from "./DraggableStack";
1 change: 1 addition & 0 deletions src/features/sort/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./components";
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export * from "./DndContext";
export * from "./DndProvider";
export * from "./components";
export * from "./features";
export * from "./hooks";
export * from "./types";
export * from "./utils";

0 comments on commit 3d9902c

Please sign in to comment.