Extend NDS patterns and migrate shared UI surfaces
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s
This commit is contained in:
parent
fef7735a1d
commit
9aa98c892d
41 changed files with 1035 additions and 405 deletions
|
|
@ -25,6 +25,7 @@ export function ToolboxCard({ toolbox, game, actions, reorder }) {
|
|||
const coverImage = gameCoverImage || toolbox.icon || DEFAULT_TOOLBOX_ICON;
|
||||
const className = [
|
||||
"card",
|
||||
"nds-card",
|
||||
"toolbox-card",
|
||||
reorder.isItemDragging(toolbox.id) ? "is-dragging" : "",
|
||||
reorder.isItemDropTarget(toolbox.id) ? "is-drop-target" : "",
|
||||
|
|
@ -32,7 +33,7 @@ export function ToolboxCard({ toolbox, game, actions, reorder }) {
|
|||
].filter(Boolean).join(" ");
|
||||
|
||||
return (
|
||||
<article className={className} {...reorder.getItemProps({ itemId: toolbox.id })}>
|
||||
<article className={className} data-variant="interactive" {...reorder.getItemProps({ itemId: toolbox.id })}>
|
||||
<button
|
||||
className="toolbox-card-drag-handle nds-icon-button"
|
||||
data-size="md"
|
||||
|
|
@ -45,7 +46,7 @@ export function ToolboxCard({ toolbox, game, actions, reorder }) {
|
|||
<Icon name="drag" />
|
||||
</button>
|
||||
<a
|
||||
className={`card-cover toolbox-card-cover-link ${gameCoverImage ? "toolbox-card-cover" : "toolbox-icon-cover"}`}
|
||||
className={`card-cover nds-card-cover toolbox-card-cover-link ${gameCoverImage ? "toolbox-card-cover" : "toolbox-icon-cover"}`}
|
||||
href={`#/toolbox/${toolbox.id}`}
|
||||
aria-label={`Ouvrir ${toolbox.name}`}
|
||||
title={`Ouvrir ${toolbox.name}`}
|
||||
|
|
@ -53,11 +54,11 @@ export function ToolboxCard({ toolbox, game, actions, reorder }) {
|
|||
>
|
||||
<img src={coverImage} alt={game ? game.title : `Icône de ${toolbox.name}`} loading="lazy" />
|
||||
</a>
|
||||
<div className="card-body">
|
||||
<div className="card-body nds-card-body">
|
||||
<p className="eyebrow">{game ? game.title : "Toolbox libre"}</p>
|
||||
<h2>{toolbox.name}</h2>
|
||||
<small>Modifiée le {formatDate(toolbox.updatedAt)}</small>
|
||||
<div className="card-actions">
|
||||
<div className="card-actions nds-card-actions nds-toolbar">
|
||||
<a className="card-icon-button nds-icon-button" data-size="md" href={`#/toolbox/${toolbox.id}`} aria-label={`Ouvrir ${toolbox.name}`} title="Ouvrir"><Icon name="open" /></a>
|
||||
<button className="card-icon-button nds-icon-button" data-size="md" onClick={() => actions.exportToolbox(toolbox.id)} aria-label={`Exporter ${toolbox.name}`} title="Exporter"><Icon name="export" /></button>
|
||||
<button className="card-icon-button nds-icon-button" data-size="md" data-variant="danger" onClick={() => actions.setConfirmModal({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue