Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/content/Components/Carousel/Carousel.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,19 @@
.carousel-indicator {
height: 8px;
width: 8px;
border: none;
padding: 0;
appearance: none;
border-radius: 50%;
cursor: pointer;
transition: background-color 150ms;
}

.carousel-indicator:focus-visible {
outline: 2px solid #fff;
outline-offset: 2px;
}

.carousel-indicator.active {
background-color: #fff;
}
Expand Down
5 changes: 4 additions & 1 deletion src/content/Components/Carousel/Carousel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,12 @@ export default function Carousel({
<div className={`carousel-indicators-container ${round ? 'round' : ''}`}>
<div className="carousel-indicators">
{items.map((_, index) => (
<motion.div
<motion.button
type="button"
key={index}
className={`carousel-indicator ${activeIndex === index ? 'active' : 'inactive'}`}
aria-label={`Go to slide ${index + 1}`}
aria-current={activeIndex === index}
animate={{
scale: activeIndex === index ? 1.2 : 1
}}
Expand Down
7 changes: 5 additions & 2 deletions src/tailwind/Components/Carousel/Carousel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,12 @@ export default function Carousel({
<div className={`flex w-full justify-center ${round ? 'absolute z-20 bottom-12 left-1/2 -translate-x-1/2' : ''}`}>
<div className="mt-4 flex w-[150px] justify-between px-8">
{items.map((_, index) => (
<motion.div
<motion.button
type="button"
key={index}
className={`h-2 w-2 rounded-full cursor-pointer transition-colors duration-150 ${
aria-label={`Go to slide ${index + 1}`}
aria-current={activeIndex === index}
className={`h-2 w-2 rounded-full cursor-pointer border-0 p-0 appearance-none transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white ${
activeIndex === index
? round
? 'bg-white'
Expand Down
8 changes: 8 additions & 0 deletions src/ts-default/Components/Carousel/Carousel.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,19 @@
.carousel-indicator {
height: 8px;
width: 8px;
border: none;
padding: 0;
appearance: none;
border-radius: 50%;
cursor: pointer;
transition: background-color 150ms;
}

.carousel-indicator:focus-visible {
outline: 2px solid #fff;
outline-offset: 2px;
}

.carousel-indicator.active {
background-color: #fff;
}
Expand Down
5 changes: 4 additions & 1 deletion src/ts-default/Components/Carousel/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,12 @@ export default function Carousel({
<div className={`carousel-indicators-container ${round ? 'round' : ''}`}>
<div className="carousel-indicators">
{items.map((_, index) => (
<motion.div
<motion.button
type="button"
key={index}
className={`carousel-indicator ${activeIndex === index ? 'active' : 'inactive'}`}
aria-label={`Go to slide ${index + 1}`}
aria-current={activeIndex === index}
animate={{
scale: activeIndex === index ? 1.2 : 1
}}
Expand Down
7 changes: 5 additions & 2 deletions src/ts-tailwind/Components/Carousel/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,12 @@ export default function Carousel({
<div className={`flex w-full justify-center ${round ? 'absolute z-20 bottom-12 left-1/2 -translate-x-1/2' : ''}`}>
<div className="mt-4 flex w-[150px] justify-between px-8">
{items.map((_, index) => (
<motion.div
<motion.button
type="button"
key={index}
className={`h-2 w-2 rounded-full cursor-pointer transition-colors duration-150 ${
aria-label={`Go to slide ${index + 1}`}
aria-current={activeIndex === index}
className={`h-2 w-2 rounded-full cursor-pointer border-0 p-0 appearance-none transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white ${
activeIndex === index
? round
? 'bg-white'
Expand Down