All files / app/components Divider.tsx

100% Statements 10/10
100% Branches 1/1
100% Functions 3/3
100% Lines 9/9

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2313x 13x 13x 13x   45x 299x                     13x 299x   299x    
import { Divider as MuiDivider, Theme } from "@material-ui/core";
import classNames from "classnames";
import React from "react";
import makeStyles from "utils/makeStyles";
 
const useStyles = makeStyles<Theme, { spacing: number }>((theme) => ({
  root: (props) => ({
    marginBottom: theme.spacing(props.spacing),
    marginTop: theme.spacing(props.spacing),
  }),
}));
 
export interface DividerProps {
  className?: string;
  spacing?: number;
}
 
export default function Divider({ className, spacing = 2 }: DividerProps) {
  const classes = useStyles({ spacing });
 
  return <MuiDivider className={classNames(classes.root, className)} />;
}