UNPKG

mui-component

Version:

some custom mui components

29 lines (28 loc) 852 B
import { type ReactNode } from "react"; import type { SxProps } from "@mui/material"; export interface ScrollToTopProps { /** 锚点元素的 id,如果不设置则默认回到页头 */ anchorId?: string; window?: (() => Node) | (() => Window); /** 传递给外层Box的 * @default {position:'fixed',bottom:'70px',right:'16px'} */ sx?: SxProps; /** 滚动多少举例触发显示 */ threshold?: number; /** 内部的内容 * @default * ``` <Fab color='secondary' size='small' aria-label="scroll back to top" > <KeyboardArrowUpIcon /> </Fab> * ``` */ content?: ReactNode; } /** 回到顶部组件(通过sx属性可以控制位置) */ export declare const ScrollToTop: (props: ScrollToTopProps) => import("react/jsx-runtime").JSX.Element;