mirror of
https://github.com/IliesAllali/parenthese.git
synced 2026-11-06 23:32:08 +00:00
Merge pull request #154 from IliesAllali/fix/pastilles-proches
Fiche : les « + » des proches en pastilles
This commit is contained in:
2 files changed
+6
-8
No files matched your search
@@ -305,9 +305,6 @@
|
||||
.pc-quick-edit:focus-visible { outline: 2px solid var(--pz-a500); outline-offset: 2px; }
|
||||
@media (hover: hover) and (pointer: fine) { .pc-quick-edit:hover { background: var(--pz-line-soft); } }
|
||||
|
||||
/* Ajouter un proche depuis la fiche en lecture (1.5.1) */
|
||||
.pc-quick-add { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
.pc-quick-add .pz-btn { gap: 4px; }
|
||||
/* « Créer « Jeanne » comme parent » sous la recherche d'un proche */
|
||||
.pc-search-create .pc-rel-avatar { color: var(--pz-a700); background: var(--pz-a50); }
|
||||
.pc-search-create em { color: var(--pz-muted); font-style: normal; }
|
||||
@@ -1054,12 +1054,13 @@ const PersonCard = ({
|
||||
|
||||
{/* Ajouter un proche sans passer par « Modifier » puis l'onglet Relations (1.5.1) */}
|
||||
{!editMode && onCreateRelative && (
|
||||
<div className="pc-quick-add" role="group" aria-label={t('Ajouter un proche')}>
|
||||
<button type="button" className="pz-btn pz-btn--ghost pz-btn--sm" onClick={() => onCreateRelative('parent', '')}><Plus size={14} strokeWidth={2} />{t('Parent')}</button>
|
||||
<button type="button" className="pz-btn pz-btn--ghost pz-btn--sm" onClick={() => onCreateRelative('spouse', '')}><Plus size={14} strokeWidth={2} />{t('Conjoint·e')}</button>
|
||||
<button type="button" className="pz-btn pz-btn--ghost pz-btn--sm" onClick={() => onCreateRelative('child', '')}><Plus size={14} strokeWidth={2} />{t('Enfant')}</button>
|
||||
// Les mêmes pastilles que « + Surnom », « + Métier » en modification (Patch, 26/10)
|
||||
<div className="pc-fill-chips pc-quick-add" role="group" aria-label={t('Ajouter un proche')}>
|
||||
<button type="button" className="pc-fill-chip" onClick={() => onCreateRelative('parent', '')}>+ {t('Parent')}</button>
|
||||
<button type="button" className="pc-fill-chip" onClick={() => onCreateRelative('spouse', '')}>+ {t('Conjoint·e')}</button>
|
||||
<button type="button" className="pc-fill-chip" onClick={() => onCreateRelative('child', '')}>+ {t('Enfant')}</button>
|
||||
{parentsList.length > 0 && (
|
||||
<button type="button" className="pz-btn pz-btn--ghost pz-btn--sm" onClick={() => onCreateRelative('sibling', '')}><Plus size={14} strokeWidth={2} />{t('Frère ou sœur')}</button>
|
||||
<button type="button" className="pc-fill-chip" onClick={() => onCreateRelative('sibling', '')}>+ {t('Frère ou sœur')}</button>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user