Skip to content

Commit

Permalink
fix: patch around MUI icons failure to work in ESM project (#731)
Browse files Browse the repository at this point in the history
* fix: patch around MUI icons failure to work in ESM project

* Create proud-trees-destroy.md
  • Loading branch information
steveluscher authored Feb 21, 2023
1 parent de22df4 commit f9e20fa
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .changeset/proud-trees-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@solana/wallet-adapter-example": patch
"@solana/wallet-adapter-material-ui": patch
---

Updated imports of Material UI icons in such a way that sidesteps the problem described here: https://github.com/mui/material-ui/issues/35233
5 changes: 4 additions & 1 deletion packages/starter/example/src/components/notify.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import LaunchIcon from '@mui/icons-material/Launch';
import {
// FIXME(https://github.com/mui/material-ui/issues/35233)
Launch as LaunchIcon,
} from '@mui/icons-material';
import { Link } from '@mui/material';
import { styled } from '@mui/material/styles';
import type { VariantType } from 'notistack';
Expand Down
12 changes: 8 additions & 4 deletions packages/ui/material-ui/src/WalletDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import CloseIcon from '@mui/icons-material/Close';
import CollapseIcon from '@mui/icons-material/ExpandLess';
import ExpandIcon from '@mui/icons-material/ExpandMore';

import {
// FIXME(https://github.com/mui/material-ui/issues/35233)
Close as CloseIcon,
// FIXME(https://github.com/mui/material-ui/issues/35233)
ExpandLess as CollapseIcon,
// FIXME(https://github.com/mui/material-ui/issues/35233)
ExpandMore as ExpandIcon,
} from '@mui/icons-material';
import type { DialogProps, Theme } from '@mui/material';
import {
Button,
Expand Down
12 changes: 8 additions & 4 deletions packages/ui/material-ui/src/WalletMultiButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import CopyIcon from '@mui/icons-material/FileCopy';
import DisconnectIcon from '@mui/icons-material/LinkOff';
import SwitchIcon from '@mui/icons-material/SwapHoriz';

import {
// FIXME(https://github.com/mui/material-ui/issues/35233)
FileCopy as CopyIcon,
// FIXME(https://github.com/mui/material-ui/issues/35233)
LinkOff as DisconnectIcon,
// FIXME(https://github.com/mui/material-ui/issues/35233)
SwapHoriz as SwitchIcon,
} from '@mui/icons-material';
import type { ButtonProps, Theme } from '@mui/material';
import { Button, Collapse, Fade, ListItemIcon, Menu, MenuItem, styled } from '@mui/material';
import { useWallet } from '@solana/wallet-adapter-react';
Expand Down

0 comments on commit f9e20fa

Please sign in to comment.