When I try to use the Material-UI's SvgIcon
component, the <path>
element is surrounded by quotes, which is preventing the SVG from rendering properly.
https://i.stack.imgur.com/InDRt.png
I'm currently working in Storybook within an MDX file. I've attempted various methods to render the SVG, but all of them lead to the same outcome. The most basic approach I've tried is:
import { accessibility1Icon } from '@cds/core/icon';
export const Template = (args) => {
return (
<SvgIcon {...args}>{accessibility1Icon[1].outline}</SvgIcon>
)
}
The content passed into <SvgIcon>
does consist of a path
. It does appear on the DOM (as shown in the image above), but it is encased in quotes.
What could be causing these quotes and how can I adjust the reference to avoid this issue?