fix(public): ts issue
This commit is contained in:
@@ -4,10 +4,11 @@ import {
|
|||||||
BatteryFullIcon,
|
BatteryFullIcon,
|
||||||
BatteryLowIcon,
|
BatteryLowIcon,
|
||||||
BatteryMediumIcon,
|
BatteryMediumIcon,
|
||||||
|
type LucideProps,
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
export function BatteryIcon({ className }: { className?: string }) {
|
export function BatteryIcon(props: LucideProps) {
|
||||||
const [index, setIndex] = useState(0);
|
const [index, setIndex] = useState(0);
|
||||||
const icons = [BatteryLowIcon, BatteryMediumIcon, BatteryFullIcon];
|
const icons = [BatteryLowIcon, BatteryMediumIcon, BatteryFullIcon];
|
||||||
|
|
||||||
@@ -21,8 +22,8 @@ export function BatteryIcon({ className }: { className?: string }) {
|
|||||||
}, [index]);
|
}, [index]);
|
||||||
|
|
||||||
if (!Icon) {
|
if (!Icon) {
|
||||||
return <div className={className} />;
|
return <div className={props.className} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return <Icon className={className} />;
|
return <Icon {...props} />;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
"build": "pnpm with-env next build",
|
"build": "pnpm with-env next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"postinstall": "fumadocs-mdx",
|
"postinstall": "fumadocs-mdx",
|
||||||
"with-env": "dotenv -e ../../.env -c --"
|
"with-env": "dotenv -e ../../.env -c --",
|
||||||
|
"typecheck": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hyperdx/node-opentelemetry": "^0.8.1",
|
"@hyperdx/node-opentelemetry": "^0.8.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user