-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert line and droppable folder init
- Loading branch information
Showing
6 changed files
with
105 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
packages/twenty-front/src/modules/favorites/components/FavoritesDroppable.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import styled from '@emotion/styled'; | ||
import { Droppable } from '@hello-pangea/dnd'; | ||
|
||
type FavoritesDroppableProps = { | ||
droppableId: string; | ||
children: React.ReactNode; | ||
isDragIndicatorVisible?: boolean; | ||
showDropLine?: boolean; | ||
}; | ||
|
||
const StyledDroppableWrapper = styled.div<{ | ||
isDraggingOver: boolean; | ||
isDragIndicatorVisible: boolean; | ||
showDropLine: boolean; | ||
}>` | ||
position: relative; | ||
transition: all 150ms ease-in-out; | ||
width: 100%; | ||
${({ isDraggingOver, isDragIndicatorVisible, showDropLine, theme }) => | ||
isDraggingOver && | ||
isDragIndicatorVisible && | ||
` | ||
background-color: ${theme.color.blueAccent20}; | ||
${ | ||
showDropLine && | ||
` | ||
&::before { | ||
content: ''; | ||
position: absolute; | ||
bottom: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 2px; | ||
background-color: ${theme.color.blue}; | ||
border-radius: ${theme.border.radius.sm} ${theme.border.radius.sm} 0 0; | ||
} | ||
` | ||
} | ||
`} | ||
`; | ||
|
||
export const FavoritesDroppable = ({ | ||
droppableId, | ||
children, | ||
isDragIndicatorVisible = true, | ||
showDropLine = true, | ||
}: FavoritesDroppableProps) => { | ||
return ( | ||
<Droppable droppableId={droppableId}> | ||
{(provided, snapshot) => ( | ||
<StyledDroppableWrapper | ||
isDraggingOver={snapshot.isDraggingOver} | ||
isDragIndicatorVisible={isDragIndicatorVisible} | ||
showDropLine={showDropLine} | ||
> | ||
<div | ||
ref={provided.innerRef} | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
{...provided.droppableProps} | ||
> | ||
{children} | ||
{provided.placeholder} | ||
</div> | ||
</StyledDroppableWrapper> | ||
)} | ||
</Droppable> | ||
); | ||
}; |
80 changes: 0 additions & 80 deletions
80
packages/twenty-front/src/modules/favorites/contexts/FavoritesDragDropContext.tsx
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
packages/twenty-front/src/modules/favorites/contexts/FavoritesDropIndicatorContext.tsx
This file was deleted.
Oops, something went wrong.
61 changes: 0 additions & 61 deletions
61
...nty-front/src/modules/ui/layout/draggable-list/components/DraggableListWithoutContext.tsx
This file was deleted.
Oops, something went wrong.