Total Complexity | 2 |
Complexity/F | 0 |
Lines of Code | 18 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 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 |