hiento09 86f0ffc7d1
Chore/disable submodule (#56)
* Chore disable git submodule for web-client and app-backend

* Chore add newest source code of app-backend and web-client

---------

Co-authored-by: Hien To <tominhhien97@gmail.com>
2023-09-05 16:29:07 +07:00

42 lines
1017 B
TypeScript

import classNames from "classnames";
import Image from "next/image";
type Props = {
title: string;
icon: string;
isLoading?: boolean;
onClick: () => void;
};
const ActionButton: React.FC<Props> = (props) => {
return (
<>
{!props.isLoading && (
<button
type="button"
className={classNames(
"rounded-xl flex items-center h-[40px] gap-1 bg-[#F3F4F6] px-2 text-xs font-normal text-gray-900 shadow-sm",
!props.isLoading && "hover:bg-indigo-100"
)}
onClick={props.onClick}
>
<Image src={props.icon} width={16} height={16} alt="" />
<span>{props.title}</span>
</button>
)}
{props.isLoading && (
<div className="w-[80px] flex flex-row justify-center items-center">
<Image
src="/icons/loading.svg"
width={32}
height={32}
alt="loading"
/>
</div>
)}
</>
);
};
export default ActionButton;