swordev / suid

A port of Material-UI (MUI) built with SolidJS.
https://suid.io
MIT License
673 stars 48 forks source link

`<MenuItem component={Button}>` #226

Closed Industrial closed 5 months ago

Industrial commented 1 year ago

Hi. Whenever I pass Button as the component prop to MenuItem (because I want to give it a href prop as well. The buttons should be links) then I get into an infinite loop problem:

resolveSources@http://localhost:3000/node_modules/.vite/deps/chunk-UX6LQNSL.js?v=cdf0f7af:1368:24
get class@http://localhost:3000/@fs/home/tom/Code/code9/deno/test-deno-solidstart/node_modules/.pnpm/@suid+material@0.12.3_solid-js@1.7.6/node_modules/@suid/material/ButtonBase/ButtonBase.jsx?v=cdf0f7af:235:7
resolveSources@http://localhost:3000/node_modules/.vite/deps/chunk-UX6LQNSL.js?v=cdf0f7af:1370:22
get class@http://localhost:3000/@fs/home/tom/Code/code9/deno/test-deno-solidstart/node_modules/.pnpm/@suid+system@0.10.2_solid-js@1.7.6/node_modules/@suid/system/createStyled.jsx?v=cdf0f7af:107:38
resolveSources@http://localhost:3000/node_modules/.vite/deps/chunk-UX6LQNSL.js?v=cdf0f7af:1370:22
resolveSources@http://localhost:3000/node_modules/.vite/deps/chunk-UX6LQNSL.js?v=cdf0f7af:1370:22
resolveSources@http://localhost:3000/node_modules/.vite/deps/chunk-UX6LQNSL.js?v=cdf0f7af:1370:22
get class@http://localhost:3000/@fs/home/tom/Code/code9/deno/test-deno-solidstart/node_modules/.pnpm/@suid+system@0.10.2_solid-js@1.7.6/node_modules/@suid/system/createStyled.jsx?v=cdf0f7af:107:38
resolveSources@http://localhost:3000/node_modules/.vite/deps/chunk-UX6LQNSL.js?v=cdf0f7af:1370:22
resolveSources@http://localhost:3000/node_modules/.vite/deps/chunk-UX6LQNSL.js?v=cdf0f7af:1370:22
get class@http://localhost:3000/@fs/home/tom/Code/code9/deno/test-deno-solidstart/node_modules/.pnpm/@suid+material@0.12.3_solid-js@1.7.6/node_modules/@suid/material/ButtonBase/ButtonBase.jsx?v=cdf0f7af:235:7
resolveSources@http://localhost:3000/node_modules/.vite/deps/chunk-UX6LQNSL.js?v=cdf0f7af:1370:22
get class@http://localhost:3000/@fs/home/tom/Code/code9/deno/test-deno-solidstart/node_modules/.pnpm/@suid+system@0.10.2_solid-js@1.7.6/node_modules/@suid/system/createStyled.jsx?v=cdf0f7af:107:38
resolveSources@http://localhost:3000/node_modules/.vite/deps/chunk-UX6LQNSL.js?v=cdf0f7af:1370:22
resolveSources@http://localhost:3000/node_modules/.vite/deps/chunk-UX6LQNSL.js?v=cdf0f7af:1370:22
resolveSources@http://localhost:3000/node_modules/.vite/deps/chunk-UX6LQNSL.js?v=cdf0f7af:1370:22
BierDav commented 5 months ago

Use component={A} instead, this should do excatly what you need

Industrial commented 5 months ago

Okay, thanks!