All files / src/shared/icons icon-base.tsx

100% Statements 1/1
50% Branches 3/6
100% Functions 1/1
100% Lines 1/1

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                      3660x                                  
import type { ReactNode, SVGProps } from 'react'
 
export interface IconProps extends SVGProps<SVGSVGElement> {
  title?: string
}
 
interface IconBaseProps extends IconProps {
  children: ReactNode
}
 
export function IconBase({ title, children, ...props }: IconBaseProps) {
  return (
    <svg
      viewBox="0 0 24 24"
      fill="none"
      stroke="currentColor"
      strokeWidth={2}
      strokeLinecap="round"
      strokeLinejoin="round"
      aria-hidden={title ? undefined : true}
      role={title ? 'img' : undefined}
      {...props}
    >
      {title ? <title>{title}</title> : null}
      {children}
    </svg>
  )
}