Polish Nebula design system controls before release
All checks were successful
Deploy Sokko G / deploy (push) Successful in 16s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 16s
This commit is contained in:
parent
817e21567b
commit
07de342fc2
31 changed files with 79 additions and 58 deletions
|
|
@ -1,16 +1,15 @@
|
|||
// Rôle : affiche le switch global de position des notifications internes.
|
||||
// Rôle : expose le choix gauche/droite des notifications via un Radio Button Group NDS.
|
||||
import { Icon } from "./Icon.jsx";
|
||||
|
||||
export function ToastPositionSwitch({ position, labels, onChange }) {
|
||||
const normalizedPosition = position === "left" ? "left" : "right";
|
||||
return (
|
||||
<div
|
||||
className="toast-position-switch nds-radio-button-group"
|
||||
data-size="xs"
|
||||
className="nds-radio-button-group"
|
||||
data-size="md"
|
||||
role="radiogroup"
|
||||
data-position={normalizedPosition}
|
||||
aria-label={normalizedPosition === "left" ? labels.left : labels.right}
|
||||
title={labels.title}
|
||||
aria-label={labels.title}
|
||||
>
|
||||
<button
|
||||
className={normalizedPosition === "left" ? "active" : ""}
|
||||
|
|
@ -18,6 +17,7 @@ export function ToastPositionSwitch({ position, labels, onChange }) {
|
|||
role="radio"
|
||||
aria-checked={normalizedPosition === "left"}
|
||||
aria-label={labels.left}
|
||||
title={labels.left}
|
||||
onClick={() => onChange("left")}
|
||||
>
|
||||
<Icon name="toast-left" />
|
||||
|
|
@ -28,6 +28,7 @@ export function ToastPositionSwitch({ position, labels, onChange }) {
|
|||
role="radio"
|
||||
aria-checked={normalizedPosition === "right"}
|
||||
aria-label={labels.right}
|
||||
title={labels.right}
|
||||
onClick={() => onChange("right")}
|
||||
>
|
||||
<Icon name="toast-right" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue