UNPKG

@etsoo/materialui

Version:

TypeScript Material-UI Implementation

17 lines (16 loc) 466 B
import { jsx as _jsx } from "react/jsx-runtime"; import IconButton from "@mui/material/IconButton"; import { useNavigate } from "react-router"; /** * IconButtonLink * @param props Props * @returns Component */ export function IconButtonLink(props) { // Destruct const { href, state, ...rest } = props; // Navigate const navigate = useNavigate(); // Layout return _jsx(IconButton, { ...rest, onClick: () => navigate(href, { state }) }); }