Import Compound icons in the new recommended way

The Compound design tokens package is now set up to generate React components for every icon, so we no longer need to use our more error-prone method of importing the SVGs.
This commit is contained in:
Robin
2024-07-25 13:15:45 -04:00
parent 10b915c707
commit 12e233970c
12 changed files with 68 additions and 40 deletions

View File

@@ -17,7 +17,7 @@ limitations under the License.
import { ComponentPropsWithoutRef, FC } from "react";
import { Button } from "@vector-im/compound-web";
import { useTranslation } from "react-i18next";
import UserAddIcon from "@vector-im/compound-design-tokens/icons/user-add.svg?react";
import { UserAddIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
export const InviteButton: FC<
Omit<ComponentPropsWithoutRef<"button">, "children">