Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes did you make and why did you make them?
This pull request introduces updates to the
Carousel
component and its related implementations, focusing on improving customization, fixing layout issues, and cleaning up unused code. Key changes include the addition of a theme property for better styling flexibility, adjustments to slide width calculations, and the removal of unnecessary components and dependencies.Carousel Component Enhancements:
carouselTheme
prop to theCustomDots
component and atheme
prop to theCarousel
component to allow for primary or secondary theme customization. Updated the background color logic inCustomDots
to reflect the selected theme. ([[1]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-3c40c606598b0bcbf1d19e82de166ea6292030ea712eec4cb138570acc6c752dR27-R50)
,[[2]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-3c40c606598b0bcbf1d19e82de166ea6292030ea712eec4cb138570acc6c752dR129)
,[[3]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-3c40c606598b0bcbf1d19e82de166ea6292030ea712eec4cb138570acc6c752dL136-R151)
)tabletSlidesToWidthMap
for improved slide width calculations on tablet devices, replacing the use ofnumberSlidesToWidthMap
in thegetSlideWidth
function. Added a note warning about potential layout issues when using this function in flexible layouts. ([[1]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-3c40c606598b0bcbf1d19e82de166ea6292030ea712eec4cb138570acc6c752dR27-R50)
,[[2]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-3c40c606598b0bcbf1d19e82de166ea6292030ea712eec4cb138570acc6c752dL156-R183)
)ResourceCarousel Updates:
minWidth
property and padding adjustments to theResourceCarousel
component for better layout consistency. ([components/common/ResourceCarousel.tsxR82-R84](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-9c11a2d1a5bdf644d4ddd33fb5b21515faf0bb0906fa14fb6913f61c12be1a21R82-R84)
)Code Cleanup:
Row
andColumn
components from theCoursesPage
file, simplifying the layout structure. ([[1]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-8a2df8b2d675c290897006246a1a404fe3bfa6c323dbfe06216a9799a8aa787cL6-L8)
,[[2]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-8a2df8b2d675c290897006246a1a404fe3bfa6c323dbfe06216a9799a8aa787cL200-L219)
)useWidth
anduseTheme
) from theStoryblokCarousel
component for cleaner and more efficient code. ([[1]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-1ee0fe1c8a8527aff5b58b5bd2d1986ea7a47b8b1d80368fc4196295b32205d9L4-R4)
,[[2]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-1ee0fe1c8a8527aff5b58b5bd2d1986ea7a47b8b1d80368fc4196295b32205d9L36-L37)
)title
prop to theStoryblokCarousel
component for better identification of carousel instances. ([components/storyblok/StoryblokCarousel.tsxR46](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-1ee0fe1c8a8527aff5b58b5bd2d1986ea7a47b8b1d80368fc4196295b32205d9R46)
)