mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 21:38:35 +03:00
Using generateCardLayout from our design library to switch between appropriate card layouts
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { generateCardLayout } from "@forensic-architecture/design-system/react";
|
||||
|
||||
import * as selectors from "../selectors";
|
||||
import { getFilterIdxFromColorSet } from "../common/utilities";
|
||||
@@ -61,6 +62,9 @@ class CardStack extends React.Component {
|
||||
}
|
||||
this.refs = [];
|
||||
|
||||
const generateTemplate =
|
||||
generateCardLayout[this.props.cardUI.layout.template];
|
||||
|
||||
return events.map((event, idx) => {
|
||||
const thisRef = React.createRef();
|
||||
this.refs[idx] = thisRef;
|
||||
@@ -68,7 +72,7 @@ class CardStack extends React.Component {
|
||||
return (
|
||||
<Card
|
||||
ref={thisRef}
|
||||
content={this.props.cardUI.layout({
|
||||
content={generateTemplate({
|
||||
event,
|
||||
colors: this.props.colors,
|
||||
coloringSet: this.props.coloringSet,
|
||||
|
||||
Reference in New Issue
Block a user