Skip to content

Commit

Permalink
docs: add sortable-gallery example
Browse files Browse the repository at this point in the history
  • Loading branch information
igordanchenko committed Jul 29, 2024
1 parent fe484b6 commit 567a204
Show file tree
Hide file tree
Showing 19 changed files with 2,426 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ demos, source code, and ready-to-use code sandboxes.
various parameters live
- [**Customization**](/examples/customization) - an example showcasing custom
render functions and various photo album props
- [**Sortable Gallery**](/examples/sortable-gallery) - an example of a sortable
gallery built with [@dnd-kit](https://dndkit.com/)
- [**Next.js Image**](/examples/nextjs) - Next.js Image component
- [**Lightbox**](/examples/lightbox) - photo gallery with lightbox built with
[yet-another-react-lightbox](https://yet-another-react-lightbox.com/)
Expand Down
16 changes: 16 additions & 0 deletions docs/examples/sortable-gallery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Sortable Gallery

Here is an example of a sortable gallery built with
[@dnd-kit](https://dndkit.com/). You can re-arrange photos via drag-and-drop.

## Live Demo

<SortableGalleryExample />

## Sandbox

<StackBlitzLink href="github/igordanchenko/react-photo-album/tree/main/examples/sortable-gallery" file="src/App.tsx" title="react-photo-album-sortable-gallery" description="react-photo-album sortable gallery" />

## Source Code

<GitHubLink suffix="sortable-gallery" />
23 changes: 23 additions & 0 deletions examples/sortable-gallery/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
13 changes: 13 additions & 0 deletions examples/sortable-gallery/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#ffffff" />
<title>React Photo Album | Sortable Gallery</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit 567a204

Please sign in to comment.