fix(public): ts issue

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-06-18 14:50:30 +02:00
parent 5c6d71f176
commit bbe0192a19
2 changed files with 6 additions and 4 deletions

View File

@@ -4,10 +4,11 @@ import {
BatteryFullIcon,
BatteryLowIcon,
BatteryMediumIcon,
type LucideProps,
} from 'lucide-react';
import { useEffect, useState } from 'react';
export function BatteryIcon({ className }: { className?: string }) {
export function BatteryIcon(props: LucideProps) {
const [index, setIndex] = useState(0);
const icons = [BatteryLowIcon, BatteryMediumIcon, BatteryFullIcon];
@@ -21,8 +22,8 @@ export function BatteryIcon({ className }: { className?: string }) {
}, [index]);
if (!Icon) {
return <div className={className} />;
return <div className={props.className} />;
}
return <Icon className={className} />;
return <Icon {...props} />;
}