Skip to content

Commit 23b0f1b

Browse files
feat(ui): export drag-and-drop components (#12626)
<!-- Thank you for the PR! Please go through the checklist below and make sure you've completed all the steps. Please review the [CONTRIBUTING.md](https://github.com/payloadcms/payload/blob/main/CONTRIBUTING.md) document in this repository if you haven't already. The following items will ensure that your PR is handled as smoothly as possible: - PR Title must follow conventional commits format. For example, `feat: my new feature`, `fix(plugin-seo): my fix`. - Minimal description explained as if explained to someone not immediately familiar with the code. - Provide before/after screenshots or code diffs if applicable. - Link any related issues/discussions from GitHub or Discord. - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Fixes # --> ### What? This PR exports the internal drag-and-drop components from `ui`. ### Why? To allow end-users and plugin authors the capability of creating drag-and-drop experiences within the admin ui by leveraging the existing dnd components used by Payload. ### How? Adds `DraggableSortable`, `DraggableSortableItem`, and `useDraggableSortable` to the exports in the `ui` package. --------- Co-authored-by: Paul Popus <paul@payloadcms.com>
1 parent 2011f28 commit 23b0f1b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

packages/ui/src/exports/client/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ export type {
8989
export { useClickOutside } from '../../hooks/useClickOutside.js'
9090
export { useClickOutsideContext } from '../../providers/ClickOutside/index.js'
9191
export { useDocumentDrawerContext } from '../../elements/DocumentDrawer/Provider.js'
92+
export { useDraggableSortable } from '../../elements/DraggableSortable/useDraggableSortable/index.js'
93+
export { DraggableSortable } from '../../elements/DraggableSortable/index.js'
94+
export { DraggableSortableItem } from '../../elements/DraggableSortable/DraggableSortableItem/index.js'
9295
export { DocumentFields } from '../../elements/DocumentFields/index.js'
9396
export { Drawer, DrawerToggler, formatDrawerSlug } from '../../elements/Drawer/index.js'
9497
export { useDrawerSlug } from '../../elements/Drawer/useDrawerSlug.js'

0 commit comments

Comments
 (0)