- dashboard: card grid replaced by status strip + nav-tile section + list - nav-tile promoted to shared component - stat tiles and usage screen de-carded, sections divided like settings - hub run tournament back to a list row - telemetry link restored in tools list
29 lines
753 B
TypeScript
29 lines
753 B
TypeScript
import { Text, UnstyledButton } from "@mantine/core";
|
|
import { Icon } from "@phosphor-icons/react";
|
|
import classes from "./nav-tile.module.css";
|
|
|
|
interface NavTileProps {
|
|
label: string;
|
|
Icon: Icon;
|
|
onClick?: () => void;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
/** A single square-ish nav tile with icon-over-label and press feedback. */
|
|
export const NavTile = ({ label, Icon, onClick, disabled }: NavTileProps) => (
|
|
<UnstyledButton
|
|
className={`${classes.tile} flxn-tile`}
|
|
onClick={onClick}
|
|
disabled={disabled}
|
|
>
|
|
<span className={`${classes.icon} flxn-tile-icon`}>
|
|
<Icon size={22} weight="bold" />
|
|
</span>
|
|
<Text size="xs" fw={600} lineClamp={2} lh={1.2}>
|
|
{label}
|
|
</Text>
|
|
</UnstyledButton>
|
|
);
|
|
|
|
export default NavTile;
|