All files / src/assets/icons TickIcon.tsx

66.66% Statements 8/12
58.82% Branches 10/17
100% Functions 1/1
70% Lines 7/10

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 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51                      519x             82x   82x       82x         82x 82x 82x                                      
import React from "react";
import { getDefaults } from "./utils";
 
type Props = {
  size?: string | number;
  width?: string | number;
  height?: string | number;
  stroke?: string;
  fill?: string;
};
 
const TickIcon = ({
  size,
  width = 15,
  height = 11,
  stroke,
  fill,
}: Props) => {
  const defaults = getDefaults();
 
  Iif (!size && !width && !height) {
    size = defaults.size;
  }
 
  Iif (size) {
    height = size;
    width = size;
  }
 
  Eif (!fill) fill = defaults.fill;
  Iif (!stroke) stroke = defaults.stroke;
  return (
    <svg
      width={width || "15"}
      height={height || "11"}
      viewBox="0 0 15 11"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M5.03572 9.99999L1.16667 5.72222M13.6667 0.833328C10.9569 3.71128 9.20425 5.57272 6.86979 8.05208"
        stroke={stroke}
        strokeWidth="1.5"
        strokeLinecap="round"
        strokeLinejoin="round"
      />
    </svg>
  );
};
export default TickIcon;