Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit d30efac5 authored by Christophe Chaudier's avatar Christophe Chaudier :rocket:
Browse files

feat: add component CarouselLibre

parent e5fa1a68
No related branches found
No related tags found
No related merge requests found
Pipeline #6727 failed
This commit is part of merge request !62. Comments created here will be created in the context of that merge request.
...@@ -28,11 +28,14 @@ function CarouselElement({name, img, link}) { ...@@ -28,11 +28,14 @@ function CarouselElement({name, img, link}) {
); );
} }
export default function Carousel() { // https://fr.reactjs.org/docs/lists-and-keys.html
export default function Carousel(props) {
const list = props.list;
return ( return (
<section className="section-carousel"> <section className="section-carousel">
<div className="row"> <div className="row">
{CarouselList.map((props, idx) => ( {list.map((props, idx) => (
<CarouselElement key={idx} {...props} /> <CarouselElement key={idx} {...props} />
))} ))}
</div> </div>
......
import React from "react";
import Carousel from "./Carousel";
const CarouselList = [
{
name: "Acceuil",
img: "/img/docusaurus.png",
link: "https://froggit.fr/",
},
{
name: "Tarifs",
img: "/img/docusaurus.png",
link: "/tarifs",
},
{
name: "Communauté",
img: "/img/docusaurus.png",
link: "/communaute",
}
];
export default function CarouselLibre() {
return (
<Carousel list={CarouselList} />
);
}
import Carousel from "@site/src/components/Carousel"; import CarouselLibre from "@site/src/components/CarouselLibre";
# Page factice # Page factice
...@@ -9,9 +10,9 @@ Page factice penser à créer une vraie page ! ...@@ -9,9 +10,9 @@ Page factice penser à créer une vraie page !
echo "Hello World" echo "Hello World"
``` ```
## Hello mon carousel ! ## Hello mon carousel Libre !
<Carousel /> <CarouselLibre />
:::note :::note
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment