packageDocumentation module import "./SvgSprite.scss" ; import classnames from "classnames" ; import * as React from "react" ; import { CommonProps } from "../utils/Props" ; public export interface SvgPathProps extends CommonProps { /** Svg graphics paths */ paths : string [ ] ; /** Svg viewBox width */ viewBoxWidth : number ; /** Svg viewBox height */ viewBoxHeight : number ; } public export class SvgPath extends React . PureComponent < SvgPathProps > { public override render ( ) { const className = classnames ( "core-icons-svgSprite" , this . props . className ) ; const viewBox = `0 0 ${ this . props . viewBoxWidth } ${ this . props . viewBoxHeight }` ; return ( < svg className = { className } style = { this . props . style } width = "100%" height = "100%" viewBox = { viewBox } > < g > { this . props . paths . map ( ( path , index ) => { return ( < path d = { path } key = { index } / > ) ; } ) } < /g> < /svg>); } }