Card refinements
This commit is contained in:
@@ -43,6 +43,14 @@ export function mapDetail(card, item) {
|
||||
return key ? item[key] : ''
|
||||
}
|
||||
|
||||
// The untruncated text behind a shortened detail. Same rule as elsewhere: the
|
||||
// tooltip explains, it never carries the only copy of something essential.
|
||||
export function mapDetailTip(card, item) {
|
||||
const key = card.map && card.map.detailtooltip
|
||||
const full = key ? (item[key] || '') : ''
|
||||
return full && full !== mapDetail(card, item) ? full : ''
|
||||
}
|
||||
|
||||
export function mapMeta(card, item) {
|
||||
const meta = (card.map && card.map.meta) || []
|
||||
return meta
|
||||
@@ -115,6 +123,7 @@ export function cardRows(card) {
|
||||
title: mapTitle(card, item),
|
||||
titletip: mapTitleTip(card, item),
|
||||
detail: mapDetail(card, item),
|
||||
detailtip: mapDetailTip(card, item),
|
||||
meta: mapMeta(card, item),
|
||||
chips: mapChips(card, item),
|
||||
link: mapLink(card, item),
|
||||
|
||||
Reference in New Issue
Block a user