Skip to content

Commit

Permalink
feat(update): minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mgcrea committed Dec 21, 2023
1 parent ed74072 commit d18361c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
Binary file added .github/assets/DraggableStackExample.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 13 additions & 14 deletions docs/src/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,29 @@
// import Link from "next/link";
// import Router from "next/router";
import { useCallback, useEffect, useState } from "react";
import { Link } from "./Link";
import { SearchIcon } from "./icon";

const docSearchConfig = {
// appId: process.env.NEXT_PUBLIC_DOCSEARCH_APP_ID,
// apiKey: process.env.NEXT_PUBLIC_DOCSEARCH_API_KEY,
// indexName: process.env.NEXT_PUBLIC_DOCSEARCH_INDEX_NAME,
};
// const docSearchConfig = {
// // appId: process.env.NEXT_PUBLIC_DOCSEARCH_APP_ID,
// // apiKey: process.env.NEXT_PUBLIC_DOCSEARCH_API_KEY,
// // indexName: process.env.NEXT_PUBLIC_DOCSEARCH_INDEX_NAME,
// };

function Hit({ hit, children }) {
return <Link href={hit.url}>{children}</Link>;
}
// function Hit({ hit, children }) {
// return <Link href={hit.url}>{children}</Link>;
// }

export function Search() {
let [isOpen, setIsOpen] = useState(false);
let [modifierKey, setModifierKey] = useState();
let [_isOpen, setIsOpen] = useState(false);
let [modifierKey, setModifierKey] = useState("");

const onOpen = useCallback(() => {
setIsOpen(true);
}, [setIsOpen]);

const onClose = useCallback(() => {
setIsOpen(false);
}, [setIsOpen]);
// const onClose = useCallback(() => {
// setIsOpen(false);
// }, [setIsOpen]);

// useDocSearchKeyboardEvents({ isOpen, onOpen, onClose });

Expand Down
4 changes: 4 additions & 0 deletions docs/src/content/docs/components/DraggableStack.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ It is built on top of the [useDragableStack](./../hooks/usedraggablestack) hook.

This component does support variable width and height items.

## Demo

![demo](https://raw.githubusercontent.com/mgcrea/react-native-dnd/master/.github/assets/DraggableStackExample.gif)

## Usage

```tsx
Expand Down

0 comments on commit d18361c

Please sign in to comment.