mirror of
https://github.com/rjNemo/ticket_manager
synced 2026-06-06 08:46:39 +00:00
26 lines
579 B
TypeScript
26 lines
579 B
TypeScript
import React, { FC, MouseEvent } from "react";
|
|
import { Fab } from "@material-ui/core";
|
|
import AddIcon from "@material-ui/icons/Add";
|
|
|
|
interface IProps {
|
|
icon?: string;
|
|
color?: "inherit" | "primary" | "secondary" | "default" | undefined;
|
|
onClick?: (e: MouseEvent) => void;
|
|
size?: "small" | "medium" | "large" | undefined;
|
|
text?: string;
|
|
}
|
|
|
|
export const FloatingButton: FC<IProps> = ({
|
|
color,
|
|
icon,
|
|
size,
|
|
text,
|
|
onClick
|
|
}) => {
|
|
return (
|
|
<Fab color={color} aria-label={icon} size={size} onClick={onClick}>
|
|
<AddIcon />
|
|
{text}
|
|
</Fab>
|
|
);
|
|
};
|