-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add skeleton to drawer component
- Loading branch information
Enrique Pérez
authored and
Enrique Pérez
committed
Nov 6, 2024
1 parent
ac51544
commit 176d046
Showing
2 changed files
with
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react' | ||
import { useCssHandles } from 'vtex.css-handles' | ||
|
||
const CSS_HANDLES = ['skeletonContainer', 'skeletonItem'] as const | ||
|
||
function Skeleton() { | ||
const handles = useCssHandles(CSS_HANDLES) | ||
|
||
return ( | ||
<div className={`${handles.skeletonContainer} pa4`}> | ||
<div | ||
className={`${handles.skeletonItem} mb4 bg-muted-5 br2`} | ||
style={{ height: '20px', width: '60%' }} | ||
/> | ||
<div | ||
className={`${handles.skeletonItem} mb4 bg-muted-5 br2`} | ||
style={{ height: '20px', width: '80%' }} | ||
/> | ||
<div | ||
className={`${handles.skeletonItem} mb4 bg-muted-5 br2`} | ||
style={{ height: '20px', width: '40%' }} | ||
/> | ||
</div> | ||
) | ||
} | ||
|
||
export default Skeleton |