forked from layer5io/sistent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: expose component for external usage
Signed-off-by: Vidit Kushwaha <[email protected]>
- Loading branch information
1 parent
eb85e4c
commit a8deaaf
Showing
6 changed files
with
56 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Carousel from './Carousel'; | ||
|
||
export { Carousel }; |
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,49 @@ | ||
import { styled } from '../../theme'; | ||
|
||
export const CarouselButton = styled('button')(({ theme }) => ({ | ||
position: 'absolute', | ||
top: '50%', | ||
transform: 'translateY(-50%)', | ||
zIndex: '1', | ||
background: theme.palette.background.paper, | ||
border: 'none', | ||
cursor: 'pointer', | ||
padding: '0.5rem', | ||
borderRadius: '50%', | ||
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.2)', | ||
'&:hover': { | ||
background: theme.palette.primary.main, | ||
color: '#fff' | ||
}, | ||
'&:first-of-type': { | ||
left: '-1.2rem' | ||
}, | ||
'&:last-of-type': { | ||
right: '-1.2rem' | ||
} | ||
})); | ||
|
||
export const CarouselWrapper = styled('div')({ | ||
display: 'flex', | ||
alignItems: 'center', | ||
width: '100%', | ||
position: 'relative' | ||
}); | ||
|
||
export const CarouselContainer = styled('div')({ | ||
display: 'flex', | ||
overflowX: 'auto', | ||
scrollBehavior: 'smooth', | ||
scrollSnapType: 'x mandatory', | ||
gap: '1rem', | ||
padding: '1rem 0', | ||
width: '100%', | ||
'&::-webkit-scrollbar': { | ||
display: 'none' | ||
}, | ||
'.carousel-item': { | ||
flex: '0 0 auto', | ||
scrollSnapAlign: 'center', | ||
width: 'auto' | ||
} | ||
}); |
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
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