Mirror of https://github.com/roostorg/coop
github.com/roostorg/coop
1import { CloseFilled } from '@/icons';
2
3export default function CloseButton(props: {
4 onClose: ((event: React.MouseEvent<HTMLElement>) => void) | (() => void);
5 customWidth?: `w-${string}`;
6}) {
7 const { onClose, customWidth } = props;
8 return (
9 <div className="flex w-fit h-fit" onClick={onClose}>
10 <CloseFilled
11 className={`rounded-full bg-slate-400/70 hover:bg-slate-400/50 p-1 cursor-pointer text-slate-200 ${
12 customWidth ?? 'w-4'
13 }`}
14 />
15 </div>
16 );
17}