react-beautiful-dnd#DraggingStyle TypeScript Examples

The following examples show how to use react-beautiful-dnd#DraggingStyle. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DownloadQueue.tsx    From Tachidesk-WebUI with Mozilla Public License 2.0 6 votes vote down vote up
getItemStyle = (isDragging: boolean,
    draggableStyle: DraggingStyle | NotDraggingStyle | undefined, palette: Palette) => ({
    // styles we need to apply on draggables
    ...draggableStyle,

    ...(isDragging && {
        background: palette.mode === 'dark' ? '#424242' : 'rgb(235,235,235)',
    }),
})
Example #2
Source File: Categories.tsx    From Tachidesk-WebUI with Mozilla Public License 2.0 6 votes vote down vote up
getItemStyle = (isDragging: boolean,
    draggableStyle: DraggingStyle | NotDraggingStyle | undefined, palette: Palette) => ({
    // styles we need to apply on draggables
    ...draggableStyle,

    ...(isDragging && {
        background: palette.mode === 'dark' ? '#424242' : 'rgb(235,235,235)',
    }),
})