/** * @file [Note: SVG paths of MUI icons] * * When creating buttons for use with PhotoSwipe, we need to provide just the * contents of the SVG element (e.g. paths) as an HTML string. * * Since we only need a handful, these strings were created by temporarily * adding the following code in some existing React component to render the * corresponding MUI icon React component to a string, and retain the path. * * * import { renderToString } from "react-dom/server"; * import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined"; * * console.log(renderToString()); */ const paths = { // "@mui/icons-material/InfoOutlined" // TODO(PS): This transform is temporary, audit later. info: '', * outlineID: "pswp__icn-info", * } * */ export const createPSRegisterElementIconHTML = (name: "info") => ({ isCustomSVG: true, inner: `${paths[name]} id="pswp__icn-${name}" />`, outlineID: `pswp__icn-${name}`, });