// Name: SVG to React TSX
// Description: Convert an SVG into a React TypeScript component with title and root-only fill prop.
// Author: benschlegel
// GitHub: benschlegel
import "@johnlindquist/kit"
const toPascalCase = (str: string) =>
str
.replace(/[_\-]+/g, " ")
.replace(/[^a-zA-Z0-9 ]/g, " ")
.replace(/\s+(\w)/g, (_, c) => c.toUpperCase())
.replace(/^\s*(\w)/, (_, c) => c.toUpperCase())
.replace(/\s+/g, "")
const deriveTitleFromName = (name: string) =>
name.replace(/Icon$/i, "").replace(/^Svg/i, "")
const kebabToReactAttr = (svg: string) => {
const map: Record<string, string> = {
"class=": "className=",