mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
Fix lint errors
This commit is contained in:
+2
-1
@@ -1,3 +1,4 @@
|
||||
import { MouseEventHandler } from "react";
|
||||
import { LinkBtnProps, LinkButton } from "renderer/components/shared/link-button.component";
|
||||
import { SvgIcon } from "renderer/components/svgs/svg-icon.type";
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
@@ -17,7 +18,7 @@ export const BsContentTabItem: BsContentTabItemComponent = ({ text, icon: Icon,
|
||||
|
||||
const t = useTranslation();
|
||||
|
||||
const handleClick = (e: React.MouseEvent<HTMLLIElement, MouseEvent>) => {
|
||||
const handleClick: MouseEventHandler<HTMLLIElement> = (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
onClick(value);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { forwardRef, useImperativeHandle, useRef, useState } from "react";
|
||||
import { forwardRef, LegacyRef, useImperativeHandle, useRef, useState } from "react";
|
||||
import { BsmIconType, BsmIcon } from "../svgs/bsm-icon.component";
|
||||
import { BsmButton } from "./bsm-button.component";
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
@@ -62,10 +62,8 @@ export const BsmDropdownButton = forwardRef(({ className, items, align, withBar
|
||||
return "right-0 origin-top-right";
|
||||
})();
|
||||
|
||||
console.log("alignClass", alignClass);
|
||||
|
||||
return (
|
||||
<div ref={ref as unknown as React.LegacyRef<HTMLDivElement>} className={className}>
|
||||
<div ref={ref as unknown as LegacyRef<HTMLDivElement>} className={className}>
|
||||
<BsmButton onClick={() => setExpanded(!expanded)} className={buttonClassName ?? defaultButtonClassName} icon={icon} active={expanded} textClassName={textClassName} onClickOutside={handleClickOutside} withBar={withBar} text={text} />
|
||||
<div className={`py-1 w-fit absolute cursor-pointer top-[calc(100%-4px)] rounded-md bg-inherit text-sm text-gray-800 dark:text-gray-200 shadow-md shadow-black transition-[scale] duration-150 ease-in-out ${alignClass}`} style={{ scale: expanded ? "1" : "0", translate: `0 ${menuTranslationY}` }}>
|
||||
{items?.map(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { CSSProperties, ReactNode } from "react";
|
||||
import { useService } from "renderer/hooks/use-service.hook";
|
||||
import { LinkOpenerService } from "renderer/services/link-opener.service";
|
||||
|
||||
@@ -5,8 +6,8 @@ type Props = {
|
||||
className?: string;
|
||||
href?: string;
|
||||
internal?: boolean;
|
||||
children?: React.ReactNode;
|
||||
style?: React.CSSProperties;
|
||||
children?: ReactNode;
|
||||
style?: CSSProperties;
|
||||
};
|
||||
|
||||
export function BsmLink({ className, href, children, style, internal }: Props) {
|
||||
@@ -15,8 +16,6 @@ export function BsmLink({ className, href, children, style, internal }: Props) {
|
||||
|
||||
const openLink = () => {
|
||||
|
||||
console.log("Opening link", href, internal);
|
||||
|
||||
if (!href) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DetailedHTMLProps, Fragment } from "react";
|
||||
import { DetailedHTMLProps, Fragment, HTMLAttributes } from "react";
|
||||
import { useThemeColor } from "renderer/hooks/use-theme-color.hook";
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
import { LaserSlider } from "./laser-slider.component";
|
||||
@@ -8,7 +8,7 @@ type Props = {
|
||||
tabsText: string[];
|
||||
onTabChange: (index: number) => void;
|
||||
className?: string;
|
||||
renderTab?: (props: DetailedHTMLProps<React.HTMLAttributes<any>, any>, text: string, index?: number) => JSX.Element;
|
||||
renderTab?: (props: DetailedHTMLProps<HTMLAttributes<any>, any>, text: string, index?: number) => JSX.Element;
|
||||
};
|
||||
|
||||
export function TabNavBar(props: Props) {
|
||||
|
||||
Reference in New Issue
Block a user