Passed
Pull Request — master (#174)
by
unknown
04:11
created

docs/src/components/HomepageFeatures.js   A

Complexity

Total Complexity 4
Complexity/F 2

Size

Lines of Code 66
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 52
c 0
b 0
f 0
dl 0
loc 66
rs 10
mnd 2
bc 2
fnc 2
bpm 1
cpm 2
noi 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A HomepageFeatures.js ➔ HomepageFeatures 0 12 1
A HomepageFeatures.js ➔ Feature 0 16 3
1
import React from 'react';
2
import clsx from 'clsx';
3
import styles from './HomepageFeatures.module.css';
4
5
const FeatureList = [
6
  {
7
    title: 'Beginner Friendly',
8
    Svg: require('../../static/img/undraw_laravel_and_vue_-59-tp.svg').default,
9
    description: (
10
      <>
11
        A beginner friendly way for editing and creating Mailables and editing templates inside a Laravel application.
12
      </>
13
    ),
14
  },
15
  {
16
    title: 'Send Test Emails',
17
    Svg: require('../../static/img/undraw_mail_sent_re_0ofv.svg').default,
18
    description: (
19
      <>
20
        MailEclipse lets you test sending emails before publishing them and using them in production. Get the layout and feel just right.
21
      </>
22
    ),
23
  },
24
  {
25
    title: 'Full of Templates',
26
    Svg: require('../../static/img/template_icon.svg').default,
27
    description: (
28
      <>
29
        MailEclipse comes with predefined templates for various types of emails based on browser friendly and compatible formats.
30
      </>
31
    ),
32
  },
33
];
34
35
function Feature({ Svg, emoji, title, description }) {
36
  return (
37
    <div className={clsx('col col--4')}>
38
      <div className="text--center">
39
        {Svg ? <Svg className={styles.featureSvg} alt={title} /> : null}
40
        {emoji
41
          ? <div className={styles.featureSvg}>{ emoji }</div>
42
          : null
43
        }
44
      </div>
45
      <div className="text--center padding-horiz--md">
46
        <h3>{title}</h3>
47
        <p>{description}</p>
48
      </div>
49
    </div>
50
  );
51
}
52
53
export default function HomepageFeatures() {
54
  return (
55
    <section className={styles.features}>
56
      <div className="container">
57
        <div className="row flex-justify-content-between">
58
          {FeatureList.map((props, idx) => (
59
            <Feature key={idx} {...props} />
60
          ))}
61
        </div>
62
      </div>
63
    </section>
64
  );
65
}
66