fix: cross domain SVG sprites (#16244)
This commit is contained in:
1 parent
aab9193e7b
commit
101fea2c1c
10 files changed
+53
-3
No files matched your search
@@ -12,7 +12,7 @@ function Icon({
|
||||
}) {
|
||||
return (
|
||||
<svg height={size} width={size} {...props} aria-hidden>
|
||||
<use href={`/icons/sprite.svg#${name}`} />
|
||||
<use href={`#${name}`} />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import * as React from "react";
|
||||
import SVG from "react-inlinesvg";
|
||||
|
||||
export function IconSprites() {
|
||||
return (
|
||||
<SVG
|
||||
src={`${process.env.NEXT_PUBLIC_WEBAPP_URL}/icons/sprite.svg?v=${process.env.NEXT_PUBLIC_CALCOM_VERSION}`}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default IconSprites;
|
||||
@@ -203,3 +203,4 @@ export type { OrgBannerProps } from "./components/organization-banner";
|
||||
export { StorybookTrpcProvider } from "./components/mocks/trpc";
|
||||
export { default as Icon } from "./components/icon/Icon";
|
||||
export type { IconName } from "./components/icon/icon-names";
|
||||
export { IconSprites } from "./components/icon/IconSprites";
|
||||
@@ -48,6 +48,7 @@
|
||||
"react-colorful": "^5.6.0",
|
||||
"react-day-picker": "^8.10.1",
|
||||
"react-hook-form": "^7.43.3",
|
||||
"react-inlinesvg": "^4.1.3",
|
||||
"react-select": "^5.7.0",
|
||||
"react-virtual": "^2.10.4"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user