Continuous Integration / build_web (push) Failing after 0s
Continuous Integration / build (macos-latest) (push) Skipped
Continuous Integration / build (ubuntu-22.04) (push) Skipped
Continuous Integration / build (windows-11-arm) (push) Skipped
Continuous Integration / build (windows-latest) (push) Skipped
Continuous Integration / nightly_release (push) Skipped
Adds edge resize handles for frameless Windows/Linux windows, reserves space for the custom titlebar, and fixes assorted unused imports, error-boundary typing and image decoding hints.
64 lines
1.4 KiB
TypeScript
64 lines
1.4 KiB
TypeScript
import {
|
|
ListItem,
|
|
ListItemButton,
|
|
type ListItemProps,
|
|
ListItemText,
|
|
} from "@mui/material";
|
|
import { createLink } from "@tanstack/react-router";
|
|
import React, { forwardRef, type ReactNode } from "react";
|
|
|
|
interface MUIListItemLinkProps extends ListItemProps<"a"> {
|
|
icon?: ReactNode;
|
|
primary: string;
|
|
className?: string;
|
|
}
|
|
|
|
const CreatedListItemLink = forwardRef<HTMLAnchorElement, MUIListItemLinkProps>(
|
|
(props, ref) => (
|
|
<ListItem component="a" ref={ref} {...props}>
|
|
<ListItemButton
|
|
sx={{
|
|
color: "inherit",
|
|
textDecoration: "none",
|
|
}}
|
|
>
|
|
<div className="material-symbols-rounded">{props.icon}</div>
|
|
<ListItemText primary={props.primary} />
|
|
</ListItemButton>
|
|
</ListItem>
|
|
),
|
|
);
|
|
|
|
const ListItemLink = createLink(CreatedListItemLink);
|
|
|
|
export default ListItemLink;
|
|
|
|
/* export default function ListItemLink(props: ListItemLinkProps) {
|
|
const { icon, primary, to, className } = props;
|
|
|
|
return (
|
|
<li>
|
|
{/* @ts-expect-error /*}
|
|
<ListItem
|
|
component={Link}
|
|
activeClassName="active"
|
|
className={className}
|
|
to={to}
|
|
>
|
|
<ListItemButton
|
|
style={{
|
|
borderRadius: "100px",
|
|
gap: "0.85em",
|
|
color: "white",
|
|
textDecoration: "none",
|
|
}}
|
|
>
|
|
<div className="material-symbols-rounded">{icon}</div>
|
|
<ListItemText primary={primary} />
|
|
</ListItemButton>
|
|
</ListItem>
|
|
</li>
|
|
);
|
|
}
|
|
*/
|