Skip to content
This repository was archived by the owner on Aug 18, 2025. It is now read-only.

Commit 73517f3

Browse files
authored
Update draggable.md style spread example
Style overrides should occur AFTER the spread of the style props, to match the guide.
1 parent 1a38085 commit 73517f3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/api/draggable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ If you are overriding inline styles be sure to do it after you spread the `provi
256256
{(provided, snapshot) => {
257257
// extending the DraggableStyle with our own inline styles
258258
const style = {
259+
...provided.draggableProps.style,
259260
backgroundColor: snapshot.isDragging ? 'blue' : 'white',
260261
fontSize: 18,
261-
...provided.draggableProps.style,
262262
};
263263
return (
264264
<div ref={provided.innerRef} {...provided.draggableProps} style={style}>

0 commit comments

Comments
 (0)