Use react-bs icons, remove bootstrap-icons css

This commit is contained in:
Igor Katson 2023-12-07 22:42:19 +00:00
parent eb25ef3cda
commit d768211457
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
24 changed files with 83 additions and 8297 deletions

View file

@ -1,11 +1,11 @@
import { MouseEventHandler } from "react";
export const IconButton: React.FC<{
className: string;
onClick: () => void;
disabled?: boolean;
color?: string;
}> = ({ className, onClick, disabled, color }) => {
children: any;
}> = ({ onClick, disabled, color, children }) => {
const onClickStopPropagation: MouseEventHandler<HTMLAnchorElement> = (e) => {
e.stopPropagation();
if (disabled) {
@ -13,11 +13,14 @@ export const IconButton: React.FC<{
}
onClick();
};
const colorClassName = color ? `text-${color}` : "";
return (
<a
className={`bi ${className} p-1`}
className={`p-1 ${colorClassName}`}
onClick={onClickStopPropagation}
href="#"
></a>
>
{children}
</a>
);
};