src/components/atoms/Divider/index.tsx
last analyzed

Complexity

Total Complexity 0
Complexity/F 0

Size

Lines of Code 38
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 0
eloc 12
mnd 0
bc 0
fnc 0
dl 0
loc 38
ccs 5
cts 5
cp 1
bpm 0
cpm 0
noi 0
c 0
b 0
f 0
1 1
import "./styles.css";
2
3
import { DividerComponent } from "./types";
4
5 1
import { buildComponent } from "../../../utils";
6
7
/**
8
 * A simple divider, useful to separate sections and paragraphs
9
 *
10
 * @since 0.4.0
11
 *
12
 * @param {string} className `common modular-ui prop` - custom className (to better customize it)
13
 * @param {boolean} unstyled `common modular-ui prop` - Style/unstyle component (to better customize it)
14
 * @param {string} id `common modular-ui prop` - `data-id` parameter (for testing purpose, to easily find the component into the DOM)
15
 * @param {boolean} dark `common modular-ui prop` - Enable/disable dark mode
16
 * @param {boolean} hide `common modular-ui prop` - Hide/show component
17
 * @param {boolean} shadow `common modular-ui prop` - Enable/disable shadow behind component (to better customize it)
18
 *
19
 *@example <caption>Example Divider usage</caption>
20
 *import { render } from "react-dom";
21
 *import { Divider } from '@cianciarusocataldo/modular-ui';
22
 *
23
 * render(<Divider />, document.getElementById("root"));
24
 *
25
 * @see https://cianciarusocataldo.github.io/modular-ui/components/atoms/Divider
26
 *
27
 * @author Cataldo Cianciaruso <https://github.com/CianciarusoCataldo>
28
 *
29
 * @copyright 2022 Cataldo Cianciaruso
30
 */
31 1
const Divider: DividerComponent = (props) =>
32 2
  buildComponent({
33
    name: "modular-divider",
34
    commonProps: props,
35
  });
36
37
export default Divider;
38