Style image carousel

This commit is contained in:
april
2024-01-15 12:47:00 -06:00
parent 2395bb10bf
commit 29c6c49b3e
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
.control {
&[data-inactive] {
opacity: 0;
cursor: default;
}
}
.controls {
transition: opacity 150ms ease;
opacity: 0;
}
.root {
&:hover {
.controls {
opacity: 1;
}
}
}
.indicator {
width: rem(12px);
height: rem(4px);
transition: width 250ms ease;
&[data-active] {
width: rem(40px);
}
}

View File

@@ -25,6 +25,8 @@ import { IconPencil, IconTrash } from "@tabler/icons-react";
import { useMutation, useQuery } from "@tanstack/react-query"; import { useMutation, useQuery } from "@tanstack/react-query";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import classes from "./route.module.css";
export default function Flight() { export default function Flight() {
const params = useParams(); const params = useParams();
@@ -136,6 +138,7 @@ export default function Flight() {
withIndicators withIndicators
slideGap="sm" slideGap="sm"
slideSize={{ base: "100%", sm: "80%" }} slideSize={{ base: "100%", sm: "80%" }}
classNames={classes}
> >
{imageIds.map((img) => ( {imageIds.map((img) => (
<Carousel.Slide key={randomId()}> <Carousel.Slide key={randomId()}>