import type { RefAttributes } from "react"; import { Children } from "react"; import classNames from "classnames/dedupe"; import type { DOMProps } from "../../types/dom"; export interface SVGProps extends DOMProps, RefAttributes { children: React.ReactElement>; className?: string; style?: React.CSSProperties; role?: React.AriaRole; "aria-label"?: string; "aria-hidden"?: boolean | "true" | "false"; "aria-labelledby"?: string; } const SVG = ({ ref, ...props }: SVGProps) => { const { children, className, ...otherProps } = props; const classes = classNames("mobius", "mobius-svg", className); const svgNode = Children.only(children); // Remove originalType and mdxType props const { children: svgChildren, viewBox, xmlns } = svgNode.props; return ( {svgChildren} ); }; SVG.displayName = "SVG"; export { SVG };