Commit 3c60fe4
committed
Refactor: Extract Arrow and Indicator components from Carousel
This commit extracts the arrow and indicator rendering logic from the main Carousel component into dedicated `Arrow` and `Indicator` components.
- I created `src/components/Carousel/Arrow.tsx` for arrow controls.
- I created `src/components/Carousel/Indicator.tsx` for indicator dots.
- I updated `src/components/Carousel/index.tsx` to use these new components by modifying `defaultProps` for `renderArrowPrev`, `renderArrowNext`, and `renderIndicator`.
- I reverted an unintentional modification to the `scripts.format` in `package.json` back to its original state.
This change improves code modularity, readability, and reusability of the arrow and indicator UI elements.
All existing tests pass, and snapshots have been updated accordingly.1 parent 7307e9d commit 3c60fe4
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
0 commit comments