.ts
TypeScript
(application/typescript)
import React, { VFC } from "react";

import type { IconProps } from "./types";

export const FileIcon: VFC<IconProps> = ({
  size = 24,
  color = "currentColor",
}) => {
  const sizeProps = {
    width: size,
    height: size,
    viewBox: "0 0 24 24",
  };
  return (
    <div
      aria-label={"file"}
      aria-roledescription={"icon"}
      style={{ width: sizeProps.width, height: sizeProps.height }}
    >
      <svg {...sizeProps} fill="none" xmlns="http://www.w3.org/2000/svg">
        <path
          fill-rule="evenodd"
          clip-rule="evenodd"
          d="M3 5C3 3.34315 4.34315 2 6 2H14C17.866 2 21 5.13401 21 9V19C21 20.6569 19.6569 22 18 22H6C4.34315 22 3 20.6569 3 19V5ZM13 4H6C5.44772 4 5 4.44772 5 5V19C5 19.5523 5.44772 20 6 20H18C18.5523 20 19 19.5523 19 19V9H13V4ZM18.584 7C17.9413 5.52906 16.6113 4.4271 15 4.10002V7H18.584Z"
          fill={color}
        />
      </svg>
    </div>
  );
};