Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 | 12x 228x 228x 1048x | import { Icon } from "@phosphor-icons/react";
import { useCustomThemeV2 } from "@theme/hooks/useCustomThemeV2";
// The desktop popover puts glyphs before the label; the mobile bottom sheet
// trails them.
export const useMenuIcon = () => {
const { isMobileView } = useCustomThemeV2();
return (Glyph: Icon) =>
isMobileView ? { IconRight: Glyph } : { IconLeft: Glyph };
};
|