Create an composition of useDrag and useDrop in the Key component to allow reorder.
Notes:
Added bgColor="chakra-body-bg" in the KeyPad component to remove white border on preview dragging Key element.
Changed the backgroundColor in the buttonStyle variable to add --chakra-colors-chakra-body-bg if the backgroundColor is not found or if it is transparent to prevent from ghost transparent preview element when dragging in some cases:
Propose to close #34
https://github.com/willianrod/ODeck/assets/20397491/dcb535d9-1090-42de-9534-30a7fcbf0a47
Create an composition of
useDrag
anduseDrop
in the Key component to allow reorder.Notes:
bgColor="chakra-body-bg"
in the KeyPad component to remove white border on preview dragging Key element.backgroundColor
in thebuttonStyle
variable to add--chakra-colors-chakra-body-bg
if the backgroundColor is not found or if it is transparent to prevent from ghost transparent preview element when dragging in some cases: