-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding skeletons to all the infiniteList components
- Loading branch information
Showing
5 changed files
with
62 additions
and
1 deletion.
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
52 changes: 52 additions & 0 deletions
52
src/components/Contacts/ContactFlow/ContactFlowRow/ContactFlowRow.skeleton.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,52 @@ | ||
import React from 'react'; | ||
import styled from '@emotion/styled'; | ||
import { Box, IconButton, Skeleton } from '@mui/material'; | ||
import { StarredItemIcon } from 'src/components/common/StarredItemIcon/StarredItemIcon'; | ||
import theme from '../../../../theme'; | ||
import { DraggableBox } from './ContactFlowRow'; | ||
|
||
export const StyledBox = styled(Box)(() => ({ | ||
display: 'flex', | ||
width: '100%', | ||
flexDirection: 'column', | ||
})); | ||
|
||
export const ContactFlowRowSkeleton: React.FC = () => { | ||
return ( | ||
<Box | ||
display="flex" | ||
width="100%" | ||
style={{ | ||
background: 'white', | ||
}} | ||
> | ||
<DraggableBox> | ||
<Box display="flex" alignItems="center" width="100%"> | ||
<Skeleton | ||
width={theme.spacing(4)} | ||
height={theme.spacing(4)} | ||
variant={'rounded'} | ||
/> | ||
|
||
<StyledBox ml={2} draggable> | ||
<Skeleton | ||
width={'100%'} | ||
height={30} | ||
style={{ maxWidth: '360px' }} | ||
/> | ||
<Skeleton | ||
width={'100%'} | ||
height={20} | ||
style={{ maxWidth: '180px' }} | ||
/> | ||
</StyledBox> | ||
</Box> | ||
<Box display="flex"> | ||
<IconButton component="div"> | ||
<StarredItemIcon isStarred={false} /> | ||
</IconButton> | ||
</Box> | ||
</DraggableBox> | ||
</Box> | ||
); | ||
}; |
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