new tool timer & alert revamp
All checks were successful
Deploy Sokko G / deploy (push) Successful in 6s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 6s
This commit is contained in:
parent
0c7ae46b4d
commit
68005ef918
38 changed files with 2048 additions and 111 deletions
20
website/src/components/ToastPositionSwitch.jsx
Normal file
20
website/src/components/ToastPositionSwitch.jsx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// Rôle : affiche le switch global de position des notifications internes.
|
||||
import React from "react";
|
||||
import { Icon } from "./Icon.jsx";
|
||||
|
||||
export function ToastPositionSwitch({ position, labels, onChange }) {
|
||||
const normalizedPosition = position === "left" ? "left" : "right";
|
||||
return (
|
||||
<button
|
||||
className="toast-position-switch"
|
||||
type="button"
|
||||
data-position={normalizedPosition}
|
||||
onClick={() => onChange(normalizedPosition === "left" ? "right" : "left")}
|
||||
aria-label={normalizedPosition === "left" ? labels.left : labels.right}
|
||||
title={labels.title}
|
||||
>
|
||||
<span><Icon name="toast-left" /></span>
|
||||
<span><Icon name="toast-right" /></span>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue