Entity mark
canonThe mark of any record: tone says which world the type belongs to, glyph says the exact type, shape says person / company / thing. One vocabulary for over twenty types.
Replaces seven parallel vocabularies (chip tile, palette glyph, listing tone, nav icons, ad-hoc header glyph, and the two picker maps in MentionInput and EntityPicker, which contradicted the canon — deal as businessplan, product rose in one picker and grey in the next, a tone on people and companies at all). Seven tones cannot cover twenty types, so the tone groups and the glyph identifies. Glyph size keeps the parity of the box — an odd difference puts the drawing on a half pixel.
Used in 21 files · 17 areas · 31× — components/assistant, components/deal, components/dialog, components/entity-preview, components/projects, components/search …
Import
import { EntityMark, entityMark, ENTITY_MARK, glyphNudge } from '@acrm/ui'
Props
EntityMark packages/ui/src/components/EntityMark.tsx
| Name | Type | Default | Description |
|---|---|---|---|
kind * | string | — | Typ záznamu — klíč do ENTITY_MARK; neznámý padá na viditelný šedý otazník. |
name | string | '' | Název záznamu: u osoby a firmy nese iniciály i odstín, jinak jen titulek. |
size | 'inline' | 'sm' | 'lg' | 'sm' | — |
photo | string | — | Fotka osoby / logo firmy. Ostatní typy prop ignorují (věc nemá tvář). |
icon | string | — | Jiný glyf, TÝŽ TÓN SVĚTA. Prázdné = glyf ze slovníku. ⛔ JEN pro číselníky, které si zakládá ZÁKAZNÍK a jejichž kresba je v jeho datech, ne v ENTITY_MARK — dnes typ úkolu (task_types.icon). Není to zkratka, jak se vyhnout řádku ve slovníku: pro pevný typ entity glyf DO SLOVNÍKU patří, jinak se paralelní mapy vrátí zadní brankou. Tón se nepřepisuje nikdy — barvu nese svět, ne položka. |
seed | string | null | — | SEED obličeje kolegy (users.avatar_seed) — jen pro typ user, ostatní ho ignorují. Bez něj se tvář počítá ze jména, takže by se přegenerovaný obličej ukázal jen svému majiteli a všem ostatním by dál svítila ta původní. |
className | string | — | — |
entityMark
No props extracted (not in props.json).
ENTITY_MARK
No props extracted (not in props.json).
glyphNudge
No props extracted (not in props.json).
CSS classes
Files
packages/ui/src/components/EntityMark.tsxpackages/ui/src/lib/entity-mark.tsapps/web/src/ds/entity-mark.css