2024-02-19 17:02:15 +01:00
|
|
|
|
import React from "react";
|
2025-12-08 20:35:45 +01:00
|
|
|
|
import {
|
|
|
|
|
|
Button,
|
|
|
|
|
|
Modal,
|
|
|
|
|
|
ModalSize,
|
|
|
|
|
|
useModal,
|
|
|
|
|
|
} from "@gouvfr-lasuite/cunningham-react";
|
2024-02-15 11:12:27 +01:00
|
|
|
|
|
|
|
|
|
|
const Onboarding = () => {
|
2024-02-21 12:45:48 +01:00
|
|
|
|
const modal = useModal({
|
|
|
|
|
|
isOpenDefault: !sessionStorage.getItem("onboarded"),
|
|
|
|
|
|
});
|
2024-02-15 11:12:27 +01:00
|
|
|
|
|
|
|
|
|
|
const handleClose = () => {
|
|
|
|
|
|
sessionStorage.setItem("onboarded", "1");
|
|
|
|
|
|
modal.close();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
<Modal
|
|
|
|
|
|
size={ModalSize.MEDIUM}
|
|
|
|
|
|
isOpen={modal.isOpen}
|
|
|
|
|
|
onClose={handleClose}
|
|
|
|
|
|
closeOnClickOutside
|
|
|
|
|
|
rightActions={
|
|
|
|
|
|
<div className="onboarding__footer">
|
2024-02-23 14:28:14 +01:00
|
|
|
|
<Button
|
2025-09-23 14:40:32 +02:00
|
|
|
|
color="brand"
|
|
|
|
|
|
variant="primary"
|
2024-02-23 14:28:14 +01:00
|
|
|
|
iconPosition="right"
|
|
|
|
|
|
fullWidth={true}
|
|
|
|
|
|
onClick={handleClose}
|
|
|
|
|
|
>
|
2024-02-15 11:12:27 +01:00
|
|
|
|
Let's go!
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
<Button
|
2025-10-14 12:22:41 +02:00
|
|
|
|
href="https://suitenumerique.github.io/cunningham/storybook"
|
2025-09-23 14:40:32 +02:00
|
|
|
|
color="brand"
|
|
|
|
|
|
variant="tertiary"
|
2024-02-15 11:12:27 +01:00
|
|
|
|
size="small"
|
|
|
|
|
|
icon={<span className="material-icons">open_in_new</span>}
|
2024-02-23 14:28:14 +01:00
|
|
|
|
fullWidth={true}
|
2024-02-15 11:12:27 +01:00
|
|
|
|
>
|
|
|
|
|
|
Go to the documentation
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
}
|
|
|
|
|
|
>
|
|
|
|
|
|
<header className="mb-b">
|
|
|
|
|
|
<span className="onboarding__title-icon">👋</span>
|
|
|
|
|
|
<h2 className="onboarding__title">Hey there!</h2>
|
|
|
|
|
|
<p>Welcome on the Cunningham Design System showcase.</p>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
<section className="onboarding__content">
|
|
|
|
|
|
<p>
|
|
|
|
|
|
👀 Through this demo, you will be able to discover{" "}
|
|
|
|
|
|
<strong>a bunch of Cunningham components</strong>. Take a look at the{" "}
|
2025-10-14 12:22:41 +02:00
|
|
|
|
<a href="https://suitenumerique.github.io/cunningham/storybook">
|
2024-02-15 11:12:27 +01:00
|
|
|
|
documentation
|
|
|
|
|
|
</a>{" "}
|
|
|
|
|
|
to see how to use them.
|
|
|
|
|
|
</p>
|
|
|
|
|
|
<p>
|
|
|
|
|
|
🖌️ You will also discover the <strong>theme feature</strong> of the
|
|
|
|
|
|
Cunningham Design System. You can switch theme through the components
|
|
|
|
|
|
in the top right corner.
|
|
|
|
|
|
</p>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
</Modal>
|
|
|
|
|
|
);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export default Onboarding;
|