mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 05:18:34 +03:00
Additional card cleanup
This commit is contained in:
18
src/components/presentational/CardSummary.js
Normal file
18
src/components/presentational/CardSummary.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import React from 'react';
|
||||
|
||||
import copy from '../../js/data/copy.json';
|
||||
|
||||
const CardSummary = ({ language, description, isHighlighted }) => {
|
||||
|
||||
const summary = copy[language].cardstack.description;
|
||||
const descriptionText = (isHighlighted) ? description : `${description.substring(0, 40)}...`;
|
||||
|
||||
return (
|
||||
<div className="event-card-section summary">
|
||||
<h4>{summary}</h4>
|
||||
<p>{descriptionText}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default CardSummary;
|
||||
Reference in New Issue
Block a user