We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi Does this library work with functional components? Thanks
The text was updated successfully, but these errors were encountered:
This is not a Function component library. However, you can do the following (Here I use the MUI library):
import Box from "@mui/material/Box" import { Draggable as SmoothDraggable } from "react-smooth-dnd" import { type ReactNode } from "react" import { type SxProps } from "@mui/material" interface TypeProps { children: ReactNode sx?: SxProps } const DndDraggable: React.FC<TypeProps> = ({ children, sx }) => { return <SmoothDraggable render={() => <Box sx={sx}>{children}</Box>} /> } export default DndDraggable
Sorry, something went wrong.
No branches or pull requests
Hi
Does this library work with functional components? Thanks
The text was updated successfully, but these errors were encountered: