Skip to content

Commit

Permalink
Restore the SVG file
Browse files Browse the repository at this point in the history
  • Loading branch information
sandhose committed Jun 20, 2024
1 parent 828459a commit 66b8fea
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/components/Avatar/AvatarStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
import classnames from "classnames";
import React, { useEffect } from "react";
import styles from "./Avatar.module.css";
import clipMask from "./avatar-clip.mask.svg?raw";

type AvatarStackProps = {
className?: string;
Expand Down Expand Up @@ -49,18 +50,9 @@ export const AvatarStack: React.FC<
useEffect(() => {
if (AvatarStackUsageCount === 0) {
const svgMask = `
<svg id="${AVATAR_MASK_ID}" class="${styles["clip-path"]}">
<clipPath id="cpdAvatarClip" clipPathUnits="objectBoundingBox">
<path
d="
M 0.875 0.16666
A 0.5 0.5 0 1 0 0.875 0.83333
Q 0.65 0.5 0.875 0.16666
Z
"
/>
</clipPath>
</svg>
<div aria-hidden="true" id="${AVATAR_MASK_ID}" class="${styles["clip-path"]}">
${clipMask}
</div>
`;
document.body.insertAdjacentHTML("beforeend", svgMask);
}
Expand Down
30 changes: 30 additions & 0 deletions src/components/Avatar/avatar-clip.mask.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 66b8fea

Please sign in to comment.