src/components/AltTitle.tsx   A
last analyzed

Complexity

Total Complexity 2
Complexity/F 0

Size

Lines of Code 18
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 16
mnd 2
bc 2
fnc 0
dl 0
loc 18
rs 10
bpm 0
cpm 0
noi 0
c 0
b 0
f 0
1
import { AltTitleProps } from "../Types/Title"
2
import "./AltTitle.scss"
3
import ReactFitText from "@kennethormandy/react-fittext"
4
import React from "react"
5
6
export const AltTitle = ({ variant, title, fitText }: AltTitleProps) => (
7
  <header className={`repeating_header repeating_header--${variant}`}>
8
    <h2 className="repeating_header__title">
9
      {fitText ? <ReactFitText compressor={2.5}>{title}</ReactFitText> : title}
10
    </h2>
11
    <span className="repeating_header__tag">
12
      {fitText ? <ReactFitText compressor={2}>{title}</ReactFitText> : title}
13
    </span>
14
  </header>
15
)
16
17
AltTitle.defaultProps = { variant: `black`, fitText: false }
18