Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

Commit c418572

Browse files
author
dpatanin
committed
Moved IntegrationCard to it's own component to avoid code repitition
1 parent adca459 commit c418572

2 files changed

Lines changed: 126 additions & 254 deletions

File tree

src/components/IntegrationCard.js

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
import React from 'react';
2+
import { withPrefix } from 'gatsby';
3+
4+
const IntegrationCard = (props) => {
5+
return (
6+
<div className="row integration-card hoverable">
7+
<div className="col-xl-2 col-lg-3 col-md-4 col-sm-4 col-4 integration-card-scanner-icon my-auto">
8+
<img
9+
className="scanner-icon"
10+
src={withPrefix(
11+
'/integrationIcons/' + props.frontmatter.title + '.svg'
12+
)}
13+
alt="persistence provider icon"
14+
></img>
15+
</div>
16+
<div className="col-xl-8 col-lg-6 col-md-8 col-sm-8 col-8">
17+
<h2 className="integration-card-title">
18+
{props.frontmatter.title}
19+
{props.frontmatter.category === 'scanner'
20+
? props.frontmatter.type.length > 0 && (
21+
<strong> ({props.frontmatter.type}) </strong>
22+
)
23+
: ''}
24+
</h2>
25+
<div className="integration-card-content">
26+
<p>{props.frontmatter.usecase}</p>
27+
</div>
28+
</div>
29+
<div className="col-xl-2 col-lg-3 col-md-12 col-sm-12 col-12 integration-card-scanner-icon my-auto">
30+
<div className="row">
31+
<div className="col-lg-12 col-md-6 col-sm-6 col-6">
32+
{props.frontmatter.state.length > 0 &&
33+
props.frontmatter.state === 'released' && (
34+
<img
35+
className="release"
36+
src={withPrefix(
37+
'https://img.shields.io/badge/State-' +
38+
props.frontmatter.state +
39+
'-green'
40+
)}
41+
alt="release version"
42+
></img>
43+
)}
44+
{props.frontmatter.state.length > 0 &&
45+
props.frontmatter.state === 'developing' && (
46+
<img
47+
className="release"
48+
src={withPrefix(
49+
'https://img.shields.io/badge/State-' +
50+
props.frontmatter.state +
51+
'-yellow'
52+
)}
53+
alt="release version"
54+
></img>
55+
)}
56+
{props.frontmatter.state.length > 0 &&
57+
props.frontmatter.state === 'roadmap' && (
58+
<img
59+
className="release"
60+
src={withPrefix(
61+
'https://img.shields.io/badge/State-' +
62+
props.frontmatter.state +
63+
'-lightgray'
64+
)}
65+
alt="release version"
66+
></img>
67+
)}
68+
</div>
69+
<div className="col-lg-12 col-md-6 col-sm-6 col-6">
70+
{props.frontmatter.appVersion && (
71+
<img
72+
className="release"
73+
src={withPrefix(
74+
'https://img.shields.io/badge/App_Version-' +
75+
props.frontmatter.appVersion +
76+
'-blue'
77+
)}
78+
alt="release version"
79+
></img>
80+
)}
81+
</div>
82+
</div>
83+
</div>
84+
</div>
85+
);
86+
};
87+
88+
export default IntegrationCard;

0 commit comments

Comments
 (0)