fix add tools button from catalog position
All checks were successful
Deploy Sokko G / deploy (push) Successful in 19s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 19s
This commit is contained in:
parent
dc9473242a
commit
ffb020ee98
3 changed files with 45 additions and 40 deletions
|
|
@ -397,23 +397,23 @@ function LibraryToolExample({ module, sourceData, description, categoryTitle, do
|
|||
return (
|
||||
<section id={getLibraryAnchorId(module)} className="library-tool-section nds-panel">
|
||||
<div className="library-tool-intro">
|
||||
<div>
|
||||
<div className="library-tool-title-row">
|
||||
<span className="module-icon" aria-hidden="true">
|
||||
<span className={`module-icon-svg module-icon-${definition.icon}`} />
|
||||
</span>
|
||||
<h2>{title}</h2>
|
||||
</div>
|
||||
<span className="library-tool-badge nds-badge">{categoryTitle}</span>
|
||||
{description && <p>{description}</p>}
|
||||
<div className="library-tool-copy-action">
|
||||
<p>{copyContent.isolationHelp}</p>
|
||||
<button className="nds-button" data-size="sm" data-variant="primary" type="button" disabled={!storageReady} onClick={onCopy}>
|
||||
<Icon name="add" />
|
||||
{copyContent.triggerLabel}
|
||||
</button>
|
||||
<div className="library-tool-intro-heading">
|
||||
<div>
|
||||
<div className="library-tool-title-row">
|
||||
<span className="module-icon" aria-hidden="true">
|
||||
<span className={`module-icon-svg module-icon-${definition.icon}`} />
|
||||
</span>
|
||||
<h2>{title}</h2>
|
||||
</div>
|
||||
<span className="library-tool-badge nds-badge">{categoryTitle}</span>
|
||||
</div>
|
||||
<button className="library-tool-copy-button nds-button" data-size="sm" data-variant="primary" type="button" disabled={!storageReady} onClick={onCopy}>
|
||||
<Icon name="add" />
|
||||
{copyContent.triggerLabel}
|
||||
</button>
|
||||
</div>
|
||||
{description && <p>{description}</p>}
|
||||
<p className="library-tool-copy-help">{copyContent.isolationHelp}</p>
|
||||
</div>
|
||||
<div className={`library-example-layout ${Array.isArray(docs?.controls) && docs.controls.length ? "has-legend" : ""}`}>
|
||||
<ToolControlLegend items={docs?.controls} heading={controlLegendHeading || "Repères"} />
|
||||
|
|
|
|||
|
|
@ -1,23 +1,4 @@
|
|||
// Rôle : met en page l'action et la modale de copie des exemples de la librairie.
|
||||
.library-tool-copy-action {
|
||||
display: flex;
|
||||
max-width: 860px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--space-4);
|
||||
margin-top: var(--space-4);
|
||||
padding-top: var(--space-3);
|
||||
border-top: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.library-tool-copy-action p {
|
||||
color: var(--color-text-muted);
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
.library-tool-copy-action .nds-button {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
// Rôle : met en page la modale de copie des exemples de la librairie.
|
||||
|
||||
.library-copy-modal {
|
||||
width: min(580px, calc(100vw - var(--space-6)));
|
||||
|
|
@ -116,11 +97,6 @@
|
|||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.library-tool-copy-action {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.library-copy-destination {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,17 @@
|
|||
}
|
||||
|
||||
.library-tool-intro {
|
||||
display: grid;
|
||||
min-width: 0;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
.library-tool-intro-heading {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
min-width: 0;
|
||||
align-items: start;
|
||||
gap: var(--space-4);
|
||||
}
|
||||
|
||||
.library-tool-title-row {
|
||||
|
|
@ -110,3 +120,22 @@
|
|||
.library-tool-intro p {
|
||||
max-width: 860px;
|
||||
}
|
||||
|
||||
.library-tool-intro .library-tool-copy-help {
|
||||
color: var(--color-text-muted);
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
.library-tool-copy-button {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
@media (max-width: 520px) {
|
||||
.library-tool-intro-heading {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.library-tool-copy-button {
|
||||
justify-self: start;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue